News for hackers. Stuff that matters.
Re:Announcing Rust 1.0 Alpha by gnuvince on Friday January 09, 2015 @03:14PM (#8864233)
Wow. Anyone remembers Rust pre-0.1? When it had typestate, ML syntax, garbage collection, etc.? So nice to see how the language slowly evolved and was molded to fit as best as possible the problem they were trying to solve.
Re:Announcing Rust 1.0 Alpha by kibwen on Friday January 09, 2015 @03:44PM (#8864397)
It's been a fascinating metamorphosis, undeniably. I'm going to attempt to turn it into an interesting talk for the tentative Rust conference that may be happening this year. :)
Re:Announcing Rust 1.0 Alpha by chuwy on Friday January 09, 2015 @08:35PM (#8865499)
Just started to learn Rust. Could you show me examples of this ancient ML syntax? Just curious how it would look like.
Re:Announcing Rust 1.0 Alpha by listic on Friday January 09, 2015 @06:09PM (#8865074)
> the language slowly evolved and was molded to fit as best as possible the problem they were trying to solve.

Which is...? Wikipedia says [1]

> "to be a good language for the creation of large client and server programs that run over the Internet"

and that looks too vague to me.

[1] http://en.wikipedia.org/wiki/Rust_%28programming_language%29...

Re:Announcing Rust 1.0 Alpha by steveklabnik on Friday January 09, 2015 @07:14PM (#8865277)
Memory safety without garbage collection.
Re:Announcing Rust 1.0 Alpha by bjz_ on Friday January 09, 2015 @08:00PM (#8865398)
Agreed. I think that description should be updated.
Re:Announcing Rust 1.0 Alpha by legulere on Friday January 09, 2015 @04:59PM (#8864780)
Wasn't garbage collection actually always just planned but never realized (other than reference counting)?
Re:Announcing Rust 1.0 Alpha by eslaught on Saturday January 10, 2015 @12:37PM (#8867275)
Yes, I worked on GC as a summer project. Turned out to be way harder than anyone had thought because LLVM isn't really set up to handle high performance GC. I have a talk on it here:

https://elliottslaughter.com/2012/09/rust-precise-gc/

Re:Announcing Rust 1.0 Alpha by steveklabnik on Friday January 09, 2015 @05:34PM (#8864925)
Sort of, yeah. Gc<T> was just refcount + simple cycle detection.
Re:Announcing Rust 1.0 Alpha by riffraff on Friday January 09, 2015 @04:51PM (#8864748)
is it really "so nice"? I wish they had been able to go forward with typestate :(
Re:Announcing Rust 1.0 Alpha by aturon on Friday January 09, 2015 @05:52PM (#8865007)
This is a very old post, but you can encode many uses of typestate pretty easily: http://pcwalton.github.io/blog/2012/12/26/typestate-is-dead/

It'd be great for someone to write a more up-to-date version of this post!

Re:Announcing Rust 1.0 Alpha by Solarsail on Friday January 09, 2015 @09:12PM (#8865598)
Haven't used Rust, but I wonder what you could use in place of the phantom types? Are Traits capable of filling this role? Am I completely misreading what Traits are?

Can Rust still do phantom types, and I just can't see them anywhere in the language reference?

Re:Announcing Rust 1.0 Alpha by xKingfisher on Friday January 09, 2015 @09:32PM (#8865641)
You should still be able to use phantom types with empty traits or enums. Here's an article[0] (admittedly from ~6 months ago), about using phantom types in Servo.

[0] https://blog.mozilla.org/research/2014/06/23/static-checking...

Re:Announcing Rust 1.0 Alpha by Jweb_Guru on Friday January 09, 2015 @09:19PM (#8865607)
Rust can still do phantom types.

    struct Foo<T>; // `T` is a phantom type parameter.
Re:Announcing Rust 1.0 Alpha by vedosity on Saturday January 10, 2015 @03:05PM (#8867739)
Phantom types aren't part of the language because they don't need to be. They're just empty types used as type parameters for structs, where the type parameter isn't actually used as a variable in the struct. It is more of a design pattern than a language feature.
Re:Announcing Rust 1.0 Alpha by vhbit on Saturday January 10, 2015 @12:39AM (#8866042)
Yes, you can read a bit about collections and how phantom types are used in them http://cglab.ca/~abeinges/blah/rust-btree-case/
Re:Announcing Rust 1.0 Alpha by bjz_ on Friday January 09, 2015 @03:22PM (#8864278)
Yeah, looking through the early commits is really eye-opening.
Re:Announcing Rust 1.0 Alpha by agumonkey on Friday January 09, 2015 @10:53PM (#8865855)
Deeply second that.