4 ms·
I've been teaching myself programming over the past six months or so, and I'm very glad that I started with Ruby. The syntax is clean, and I think it's awesome
by happy4crazy 16y ago
I've been teaching myself programming over the past six months or so, and I'm very glad that I started with Ruby.
The syntax is clean, and I think it's awesome that Ruby's object model is so elegant. I agree that the magic parts are frustrating at first, but it's pretty neat that you can spend a couple weeks reading, e.g. Paolo Perrota's Metaprogramming Ruby, and then actually know how it works!
In terms of conceptual and syntactic elegance, I personally prefer Ruby to, say, Python. I watched most of the videos for MIT's intro CS class (available on academicearth.org), which uses Python, and just never particularly enjoyed it. It just struck me as messier than Ruby. That said, I'm sure I should give Python another chance.
But at the end of the day, I think the main advantage of Ruby over something like Java, at least as a teaching language, is that you get a REPL. My memory of complete-noob-hood is still fresh enough to say that being able to do interesting things in a REPL is HUUUGE. And even now that I've got a bit more programmatic maturity, I wouldn't have gotten nearly as far with Haskell as I have without GHCi.
So... I wonder what it would be like to teach a class using Javascript? Marijn Haverbeke's book, Eloquent Javascript, is pretty awesome, and I bet you could teach a pretty sweet class using it in conjunction with something like Node (for its REPL, in addition to all its other webby goodness). Hmm...