A Look at Rust from 2012

https://news.ycombinator.com/rss Hits: 11
Summary

A look at Rust from 2012November 25, 2025 Reddit LobstersRecently I was scrolling through brson’s Rust quote database and stumbled upon a link to the official Rust tutorial from the very beginning of 2013. It says Rust 0.6 in the corner, but it lists many things that were removed in 0.6, so it’s likely closer to 0.5.I heard tales of old Rust before, but not of how the language felt to programmers. So I thought it’d be cool to give a (relatively) quick summary of Rust as presented in the tutorial and yap a bit about how far we’ve come since then.First impressions matter, and Rust doesn’t disappoint:The Rust compiler currently must be built from a tarball, unless you are on Windows, in which case using the installer is recommended.…followed by the classical ./configure && make && make install tutorial. The building process also relied on Python 2.6. Installing Rust on Windows also required manually installing MinGW. Modern rustup is a blessing!Here’s our “Hello, world!”:fn main() { io::println("hello?"); } io was part of core, and modules from core were globally visible. There was no alloc, so e.g. vec was part of core. The difference between core and std was more about low vs high level than objective limitations.There were no pretty errors yet – the helpful diagnostics were a later addition:hello.rs:2:4: 2:16 error: unresolved name: io::print_with_unicorns hello.rs:2 io::print_with_unicorns("hello?"); ^~~~~~~~~~~~~~~~~~~~~~~ There was no println!, but there was fmt!, which took an sprintf-like format string (glad we moved away from that):io::println(fmt!("%s is %d", "the answer", 43)); io::println(fmt!("what is this thing: %?", mystery_object)); On the topic of macros, it’s surprising how little the macro_rules! syntax has changed. Present-day macros were called “syntax extensions”, and “macros” only referred to declarative macros.IMO, the book focused too much on syntax and not enough on ownership and borrowing – which makes sense, since the current model didn’t ex...

First seen: 2025-12-03 12:57

Last seen: 2025-12-03 23:01