r/programming • • Feb 24 '13

Ruby 2.0.0

http://www.ruby-lang.org/en/news/2013/02/24/ruby-2-0-0-p0-is-released/
600 Upvotes

193 comments sorted by

View all comments

10

u/TheWakeUpCall Feb 24 '13

Where can you learn Ruby?

14

u/TikiTDO Feb 24 '13

2

u/hak8or Feb 24 '13

Holy crap this looks amazing. The book code appears to be on a repo, and if people notice something wrong they appear to fix it. The HTML is fully free, but if you want you can purchase a epub/PDF for only THREE DAMN DOLLARS! I don't know why buying both costs five, but still.

Anyone have an opinion on the books for Ruby and Python? Oh wait, his Python is for the old 2.XX version and not the newer 3.XX version, damn.

-1

u/[deleted] Feb 24 '13

If you are learning Python, I would still go for the 2.x.x version... It's still more widely used then 3 and you should be well prepared for the changes in 3 after learning 2.

13

u/xiongchiamiov Feb 24 '13

This sort of advice is precisely why 2.x is more widely used than 3.x. Dammit, people, start writing things in 3.x and backport to 2.6, 2.7 so we can finally move on with our lives!

6

u/jargoon Feb 24 '13

This is why having Rails around is great for the Ruby community. New version of Ruby comes out, Rails core team says "the next version of Rails will only support new version of Ruby or higher", adds a bunch of deprecation warnings, and everyone either gets off their asses and updates their gems or new gems pop up to replace them.

1

u/catcradle5 Feb 25 '13

I agree with you, but as someone who writes in Python every day, I exclusively write in Python 2.7 because many, many of the libraries I rely on are still written for 2.x. I am not going to port those libraries myself. I am going to use the best tool for the job, and for now that is still 2.7. Python 3 is overall a better language, but the disadvantages of the unsupported libraries outweighs the advantages of the wart removals and feature additions.

It's certainly good for everyone, including beginners, to know most of the changes in Python 3 though, and they should know how to read, write, and modify Python 3 code.

3

u/earthboundkid Feb 24 '13

If you're learning Python, just learn both. They aren't especially different. If you learn the changes to string, you're 80% of the way there. I recommend starting with 3 first because it has codified more modern idioms, but it doesn't really matter. If you have a book written in 2 that has idiomatic code, you can just start with that. Either way, if you're serious about Python, you should know both eventually.