Slashdot videos: Now with more Slashdot!

View

Discuss

Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

And I accidently sent my comment away. The syntax is great, but I don't like the way Ruby hasn't crystallized yet. Every new version they somehow remove compatibility with the old versions, that's bad. My scripts stop working and I have to fix everything, this is not userfriendly.

Documation is scattered and incomplete. It's something that needs to fixed if they want to get to version 4

Are you sure you mean what you say? The last release to appreciably break compatibility was the jump from 1.8 to 1.9, when they replaced the interpreter with a JIT VM (this should have been called 2.0, IMO). That was back in 2007. Every release since then has preserved backwards compatibility.

If you actually meant Rails, well, then I understand that. At least they're improving.

You make it sound as if Python 2.X was dead. They handled the major, breaking changes in a rather nice way. Python 2.7 is still supported to this day, has many backported features from 3, and doesn't break compatibility.

In fact, you make it sound like the mere existence of Python 3.0 killed it. I wasn't aware it was dead.

And if you want more documentation get your hands on the book "Programming Ruby" (often incorrectly called "the pickaxe book"), like everybody else does. It is frequently updated for the latest ruby versions. Since it's from Pragmatic Programmers, purchase once and get the (pdf) updates whenever they come out.

I can't speak to upgrading; I've been using ruby 1.9 the entire time. But, you are wrong, IMO, about documentation. First things I looked up in a modern scripting language, the data structures, and os interactions, were awesome. Take a look at these, and then, you can even click on them to see their c header!

Ruby adds nothing to the existing languages, which already have the plus of having zillions of libraries and modules developed.
Wasted effort.

Screw it, you're right. Why people don't just code in C I don't know? I mean, you can do anything in that language. You can even simulate "classes", make use of those so-called "design patterns". Even Ruby's meta-programming model could be done with a bit of hackery with pointers. Who gives a toss over how readable a language is, or whether the language is optimised for "programmer joy"? What nonsense. I'm with you bro, if people can't learn to code in a real language they should just get off the bus.

You are more likely to "shoot yourself in the foot" so to speak and code can get unmanageable.

In short given too much flexibility you can make the language so different than the norm. 10 people with 10 different styles writing Ruby code on a 2+ year project...come back after a 6 month break take a look and you got a big mess on your hands:) Style guides help there but still.

Bottom line and not just ruby avoid getting "cute" with the language. I got berated by a college prof. because I thought it was a go

Meta-programming done poorly can drive your co-workers to drink, especially if you've taken to using some clever-clever idiomatic re-use of common methods or operators that's not apparent to anyone outside your own head (possibly what your college prof. was taking issue with). Some legacy code that I've had to dea

Ah... but in my team we have a basic catch-cry: "Be nice to your future self". Plus all code is reviewed by other team members. So if you feel like doing something weird, someone will tap you and ask "what's all this mean?". But yes, thank you for the fix.

You're describing inexperienced programmers not understanding the pros and the cons of the available constructs. That does not make the constructs inherintly bad. Attribute definition is done with metaprogramming in ruby, generally, but there's not a lot of confusion as to what the code is doing. It all has to do with conventions and applying them appropriately.

Python is a great language. I wouldn't want to fan the flames of the Ruby vs. Python debate as the intent behind both languages is essentially the same. Matz designed the language to be human-centric, following the "principle of least surprise". Python is similarly very friendly to coders. That's what I love about Ruby. When I started out coding in the language and had to figure out how to do something new it was often a matter of asking what's the most obvious way. And usually that worked. Plus you have al

Not to be snarky...but what I'm hearing from you is this: "Ruby and Python occupy the same niche and there's no compelling reason to prefer Ruby over Python". This seems to jive with what the guy said who you were responding to: "Ruby adds nothing to the existing languages". If the only language that existed were C then I'd say that guy is full of shit because in that case Ruby would clearly "add something to the existing languages". But, given Python's existence, he kind of has a point. Python is mor

I don't know enough about Ruby to say anything positive or negative about it. I was just commenting on Python because that's what I know - it's just funny to hear people moan and whine about similar things, which I've heard re. Python. And the quote "Ruby adds nothing to the existing languages" is harsh, C certainly got slapped around in its early days. Who needs to get slapped around more now and kicked off the bus (or at least charged for taking up two seats) is Java.

I like both. For different reasons. Python's mental model is a bit simpler to reason about usually. Equating modules to files and the like is very clean. With Ruby any object's definition is open, and can be continued in any part of the program. This does make it harder to reason about, but like with many advanced features, this is best used sparingly. It does open the door for other programming syles though. I've seen this applied to create AOP and SOP type programs. Another element I enjoy is the block pa

"Python is more widely supported, has a larger base of developers, is generally thought to be a better "thought out" language in terms of design, and is well-suited to solving the same sort of problems Ruby is well-suited to solving."

Obviously I prefer Ruby and to touch on the meta-programming aspect (whether good or evil), IMHO Ruby does a better job in this area. Mutable classes might give some people the heebie-jeebies, but it's saved my bacon several times. Ruby's Smal