Hacker News new | past | comments | ask | show | jobs | submit login
Rust 0.4 call for testing (mail.mozilla.org)
88 points by stalled on Oct 4, 2012 | hide | past | favorite | 14 comments



I am quite impressed with the design of Rust. For any strongly typed-language, I am always curious about how it handles generics. Most new languages will take in functional language features now a days and so does Rust. But, I think its killer feature is easier generics. C++, Java and to some extent, Scala have not been successful in taming the complexity that gets introduced while supporting generics. I think Rust with its prototype-like take on generics similar to Go, but still remaining strongly-typed, is a great design. I will be curious to know what you guys think about that.


Generics are great, but Rust's killer feature is regions, (Variable lifetime semantics), and, maybe moreso, its memory ownership semantics (e.g. reference borrowing). These aren't strictly separate features, they work together nicely. What I'm looking forward to is discovering how these features Will allow me to express some deeper aspects of what I _mean_ when coding, and have the compiler statically perform sanity checks for me.


There are a number of languages with support for generics. If easier generics was Rust's claim to fame, it would have quietly disappeared into LtU-land, never to be seen again.

Luckily, there's a lot more to Rust than that. Killer feature generics aren't.


Why do you think easier generics is not that important? I find that complexity of a statically compiled language increases manifold because of the way they handle generics. Do you think complexity does not increase or do you think complexity is not a criterion for success of a language?


I have experienced some form of generics in Modula-3, Ada, Eiffel, C++, C#, D, Java, Scala, OCaml, F#, Haskell.

Given my CS background, the only language I think does a poor job with generics is Java.

As for language's success, it is usually related to which company is pushing it, or which killer feature/framework makes the people want to learn it.

I am not aware of any language that went mainstream just because it was simpler than existing ones, without having one of the reasons listed above tied to it.


Not killer feature ≠ not important.


From what I can see, rust is borrow more functional language features: its generics implementation seems to be similar to Haskell's type classes.


Even more functional-ish features: most block-based constructs are actually parse transforms on top of HoFs. For instance

    for 5.times {
        // code
    }
desugars to:

    // |args*| { stmt* } is the Rust block syntax
    times(5, || {
        // code
        true // explicit order to continue
    })


I somewhat wish they had used something like the ruby style for this to allow chaining of the blocks e.g.

    5.times{|x| x}.select{|x| x < 3}.collect{|x| x + 2}
Edit: Ok ignore that it seems they do have that (https://mail.mozilla.org/pipermail/rust-dev/2012-July/002000...) not sure of the difference, maybe just a result of the fast development.



Is typestate still in? I read somewhere it was coming out in 0.4 but I don't see anything about it in the release notes. I think it's one of Rust's most interesting features and hope it does stay put.


No, typestate has been removed from the language. However, you can get a lot of its functionality with session types.


Would the Final Name still be called Rust? Or is it a code name only?


They have a logo, so I'm thinking it's final: http://www.rust-lang.org/




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: