Rust release lightning talk

May 27, 2015 08:58

I don't often give talks about Rust, but I was in Tokyo recently during the Rust 1.0 release and figured I'd drop in on the Mozilla Tokyo office release party. I figured they'd try to make me talk about something, so I prepared a lightning talk. As is typical of my Rust-project communication style, I presented in point form. This is the contents of the talk:

Five lists of six things about Rust:

  1. Six ways Rust is fundamentally different from how it started
    1. Borrow checker subsumed most other safety mechanisms, lots discarded
    2. Much more static: monomorphization of sizes, glue code, and static trait dispatch
    3. LLVM: strengths (amazing optimization) and weaknesses (narrow semantics)
    4. Between these two points, maybe 100x faster at runtime, 100x slower to compile
    5. Grammar, resolution, dispatch, type system much more complex, expressive
    6. Adopted standard C platform stack, threads, ABI, linkage, mangling, unwinding
  2. Six ways Rust is fundamentally the same as how it started
    1. Safety through memory ownership and isolation, no global GC, no aliased mutable state
    2. Default immutable, algebraic data types ("ML in C++ clothing")
    3. Focus on dense memory layout, interior allocation, minimizing pointer chasing, vectors over lists
    4. No global namespace, everything module scoped and crate relative
    5. Support for standard tools: gdb, perf, dtrace, objdump
    6. RAII, dtors, idempotent uncatchable unwinding ("crash only")
  3. Six things we lost along the way
    1. Typestate system
    2. Effect system
    3. Function complexities: parameter modes, argument binding, stack iterators, tail calls
    4. Language-integrated runtime for tasks, channels, logging
    5. GC pointers, task local GC (yes, rustboot had a real mark/sweep)
    6. Dynamic, structural object types
  4. Six things we gained along the way
    1. Lambdas, with environment capture
    2. First class borrowed pointers -- not just parameter modes -- with explicit lifetimes
    3. Traits, with associated items
    4. Hygienic macros beyond just raw syntax extensions
    5. Multiple parallelism modes beyond just actors (ARC, fork/join, SIMD)
    6. Cargo, crates.io, a huge vibrant community!
  5. Six things I'm irrationally, disproportionately pleased by
    1. Rich patterns: slice patterns, range patterns, or patterns
    2. Novel consequences of move semantics: static freeze/thaw, iterators that consume their containers
    3. Rich syntax extensions: compile time regular expressions, SQL statements, docopt
    4. Novel embeddings: postgres and python extensions, crypto libraries, kernels in rust
    5. C++ ballpark on benchmarks
    6. A 1.0 stable release after nearly a decade of work

  6. (Ok, maybe my pleasure at some of these is rational and proportionate..)

    This entry was originally posted at http://graydon2.dreamwidth.org/214016.html. Please comment there using OpenID.

tech

Previous post Next post
Up