+[ intro slide - my language background ]
+
Hi. This talk is going to be, mostly, a plug for Rust.
Those of you who know me may find this surprising. After all Rust in
C======================================================================C
+[ overview slide? | syntax ]
+
Apart from the ownership system, there is little new in Rust.
Nevertheless, it is an advanced language with a lot of expressive
power - power which is generally available without sacrificing
features of earlier research languages, and package them up into a
whole which feels fairly familiar and is easy to use.
+I'm going to zoom through a few of Rust's most important properties:
+
+[ syntax | safety ]
+
Rust's syntax is a conventional structure of curly braces, keywords,
parentheses, and infix expressions. It looks a lot like C or
JavaScript or something.
+[ safety | type ]
+
Rust is safe by default. That is, bugs in your code can't corrupt
memory the way that they do in C and C++. But, unlike most other safe
languages, if you really want full manual control, you can write
`unsafe'. This is rarely needed, even if you want really fast code.
+[ type | inference ]
+
Rust is statically typed. The compiler will typecheck it. This is
great. You may have heard Haskell and Ocaml programmers say "once you
can get the program to typecheck, it will probably work". Rust has
Rust also has type inference (similar to Ocaml, Haskell, etc.), so you
can often leave out the type annotations.
+[ polymorphism ]
+
Rust supports polymorphism (also known as `generics'; it calls the
feature `traits'. They're a bit bit like C++ templates, but not mad.
Rust supports dynamic dispatch (like `virtual' in C++), or static
Of course nothing is perfect. I'm very critical by nature, so I often
find things to gripe about.
+[ borrow checker error ]
+
The most obvious difficulty with Rust, if you read the internet, is
some's feeling they are constantly fighting the borrow checker.
Personally I have not found this to be a problem at all. I think it
Luckily this doesn't come up very often, and it is still possible to
hide the issue from the API's consumer. The awkwardness is tolerable.
+[ serde | macro_rules! ]
+
Rust does have macros. In fact it has two ways to define macros (one
built on top of the other). The more sophisticated macro system is
very capable and has been used to really impressive effect. But it's
simultaneously too complicated and underpowered. So casual macro use
is slightly awkward.
+[ cargo - dw posts, links ]
+
But the worst problem is cargo. Cargo is Rust's language-specific
package manager and build tool. It is really quite annoying.
F======================================================================~
+[ rust-lang, ian.jackson@ ]
+
Despite these difficulties, and of course a fair few minor
irritations, I have found programming in Rust to be both fun and very
productive.