top | item 12315147

Announcing Rust 1.11

321 points| eslaught | 9 years ago |blog.rust-lang.org

92 comments

order
[+] nercury|9 years ago|reply
Most importantly, the finished MIR revolution [0] will finally allow developers to focus on new exciting features, like ergonomic "impl Trait" [1], incremental compilation, or even the beginnings of Gc [2].

[0]: https://github.com/rust-lang/rust/pull/35764

[1]: https://github.com/rust-lang/rust/issues/34511

[2]: http://manishearth.github.io/blog/2016/08/18/gc-support-in-r...

[+] BinaryIdiot|9 years ago|reply
> even the beginnings of Gc [2]

I was surprised to hear this and immediately thought "but why would you do such a thing!?" but I read the blog post and I'm impressed with the forethought that I certainly lacked. This is freaking genius.

[+] masklinn|9 years ago|reply
AFAIK the MIR isn't on in 1.11 yet.
[+] cpeterso|9 years ago|reply
Adding to_degrees() and to_radians() methods to f32 and f64 seems a little out of place, considering f32 and f64 are numbers without units. Why not include to_celsius() and to_fahrenheit() then?
[+] widdma|9 years ago|reply
Technically radians and degrees are dimensionless since they're ratios.

More to the point, though, is 'sin' and 'cos' are also methods, so having 'to_degrees' as a method seems reasonable.

[+] ben0x539|9 years ago|reply
I'm kinda weirded out by non-idempotent `to_foo()` methods...
[+] petters|9 years ago|reply
So you can write

  value.to_radians().to_radians()
then? Weird.
[+] kbenson|9 years ago|reply
Probably because those are normal mathematical operations to convert between different units of measurement for the same abstract thing in math.
[+] yarper|9 years ago|reply
I'm enjoying that bors is a named contributor. Finally the recognition our robot overlords deserve
[+] steveklabnik|9 years ago|reply
Bors does a lot of work every release! Bots are people too :p
[+] weinzierl|9 years ago|reply
> We’re excited about features like MIR becoming the default and the beginnings of incremental compilation, and the 1.11 release has laid the groundwork.

The changelog is silent about these two points, so does it mean that -Z orbit defaults to "on" in 1.11 and -Z incremental can be used in 1.11?

[+] GolDDranks|9 years ago|reply
I think it's on in the 1.12 beta, which was also published today. The orbit switch was switched on during the cycle that just ended, so I'd be surprised if it was already on on the stable.
[+] mhaymo|9 years ago|reply
From the documentation of Iterator.sum https://doc.rust-lang.org/std/iter/trait.Iterator.html#metho...

> When calling sum and a primitive integer type is being returned, this method will panic if the computation overflows.

I thought Rust's strategy for numeric overflow is to panic only in debug mode. Has that strategy changed or is this a special case?

[+] steveklabnik|9 years ago|reply
This _might_ just be an oversight, would you like to file a bug? If not, I can.
[+] vvanders|9 years ago|reply
> Build scripts can now emit warnings.

Nice! This one bit me pretty bad when first getting into Rust so it's nice to see it improved.

[+] oDot|9 years ago|reply
Quick Rust noob question: I heard there's a new book in writing. Should I wait for it or read the current one?
[+] steveklabnik|9 years ago|reply
Author here!

You can check out the new book here: http://rust-lang.github.io/book/

We're working on the new book because the old book isn't as good as it could be, but that doesn't mean it's bad: a lot of people have told me that they really love it. But I am hyper-critical of my own work, and there's a lot of ways you can improve something that's already good :)

As you can see, the new book isn't really far enough along to fully teach you Rust yet. I would maybe check out the new material first, and then just read the existing book afterwards.

[+] markus2012|9 years ago|reply
Amazing Rust announcements (core and third party) have been coming in constantly for quite a while now.

So much win.

[+] theseoafs|9 years ago|reply
Does the addition of MIR have any immediate positive impact on compile times or binary optimization?
[+] pcwalton|9 years ago|reply
Servo's compile time went down by about 20% or so. We think that it's because non-zeroing drop enabled LLVM's memcpy optimizer (which is currently pretty fragile pending the MemorySSA rewrite) to do a better job.
[+] kzrdude|9 years ago|reply
It doesn't seem like it -- the benefits will be developed over time, for example MIR-based optimization passes.
[+] Keyframe|9 years ago|reply
Can't wait for the bottled homebrew for it to drive it around. It's still at 1.10.

--HEAD just hangs forever on 'Checking out branch master' for some reason for me.

[+] sdegutis|9 years ago|reply

[deleted]

[+] vardump|9 years ago|reply
Why a major OS would need to be "picking up Rust as a first class citizen"? What does that even mean?

So far no major OS has picked C++, Java or any other language than C as a first class citizen either. All of the OS related loadable library APIs are still C.

Doesn't seem to slow down any of those languages, though.

[+] pcwalton|9 years ago|reply
1. Rust isn't a component of Firefox.

2. I'd be interested to know why Servo is a "pipe dream".

3. Why does a major OS need to pick up Rust as a "first class citizen", when they haven't done so for JavaScript, Java, Python, PHP, Ruby, Go, D, Scala, Haskell, Lua, Clojure, etc. etc.?

[+] the_mitsuhiko|9 years ago|reply
Firefox and Mozilla might very well go down but Rust can stand on its own. Not sure however what "first class citizen" for a programming language on an OS means. Can you clarify?
[+] cageface|9 years ago|reply
Why is Firefox "on hospice"?
[+] steveklabnik|9 years ago|reply
I don't share your evaluations here, but a question:

  > no major OS seems to be picking up Rust as a first class citizen, 
What would this mean to you?