Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This reminds me of http://brson.github.io/archaea/, which is a really fantastic project by Brian Anderson. It shows iterations of Rust's test files over the years, so you can see what older Rust syntax looked like.

Regardless, very cool!



Wow, you're right. Apparently this was Rust in 2010-06-23:

    io fn starve_main(chan[int] alive) {
      log "signalling main";
      alive <| 1;
      log "starving main";
      let int i = 0;
      while (true) {
        i += 1;
      }
    }


Yep! Some interesting things in here:

`io fn`, there were three effects: io, state, and unsafe. There was also pure, for functions with no effect.

chan for channels. <| was a "semi-synchronous message send," it blocked if the queue was full.

square brackets for generics

int was two's compliment signed integer with machine dependent size

log for printing to the screen




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: