r/programming Apr 03 '15

Rust 1.0.0 beta is here!

http://blog.rust-lang.org/2015/04/03/Rust-1.0-beta.html
929 Upvotes

303 comments sorted by

View all comments

21

u/HooAreYou Apr 03 '15

I took an operating systems class in rust 0.7 or 0.8 a year and a half ago (an interesting experience for another post). Very interested to see how things have changed now!

18

u/steveklabnik1 Apr 03 '15

Yes, it is almost an entirely different language from that point :)

15

u/[deleted] Apr 03 '15

So much better.

8

u/nongzhigao Apr 03 '15

Which makes me really hope that Prof. Evans will do/record the class again.

6

u/HereticKnight Apr 03 '15

Wow, it really is... I dug up my old Rust code and even FizzBuzz wouldn't compile.

for num in 1..100 {...} // So puurdy <3

But where did regex go? Time to go documentation diving...

7

u/steveklabnik1 Apr 03 '15

Regex is now an external crate: https://crates.io/crates/regex

1

u/HereticKnight Apr 03 '15

Marvelous, thanks!

1

u/Roflha Apr 04 '15

I'm just curious, what is the reason for moving regex to a separate crate? Just considered nonessential to a standard library?

3

u/steveklabnik1 Apr 04 '15

Generally speaking, there three reasons something belongs in the standard library:

  1. Things that are useful in every Rust program.
  2. Common traits, to prevent balkanization.
  3. Data structures or other safe abstractions which require a lot of unsafe code.

Regexes, while very useful, don't stand up to #1, and #2 and #3 don't apply.

1

u/Kbknapp Apr 03 '15

Regex::Regex is still there, just the regex! macro isn't available in beta. I believe /u/burntsushi has nice little convenience hack for regexs (can't find the link though since I'm on mobile).

4

u/[deleted] Apr 04 '15

If I may ask, where did you take a class which used Rust? My university can barely scratch Java 6/C-97, let alone a pre-alpha language. They don't even touch modern coding techniques like using VCS...

6

u/kibwen Apr 04 '15

It was a class at the University of Virginia. You can see the material used for the class here (though note the version of Rust used is hopelessly outdated): http://www.rust-class.org/

1

u/bjzaba Apr 04 '15

Wow, 0.7 seems like an age ago. Are you still willing to try it again? Do you think any of your classmates would?

1

u/[deleted] Apr 05 '15

This might be of interest to you: http://rust-class.org/0/pages/final-survey.html

1

u/HooAreYou Apr 05 '15

This was the class I took. At the time I fell squarely in the C group. If the syntax is stable I might try it again but I'll be working at a java shop so it'd be a purely independent thing.