PDA

View Full Version : Opinions on Ruby (not on rails)


Jessehk
February 27th, 2006, 07:04 PM
Having a good beginner's knowledge of C++ (classes, inheritance, templates, exceptions, etc), and a similar knowledge of Python (though I am still learning this language), I decided to look at Ruby.

I by no means have any qualifications to say so, but these are my impressions:


Class fields can't be accessed outside of class methods == good
no pointless self.variable on every field
just as fast (if not faster) then python
a lot more Perl like then Python like
more complete OO. Instead of
len(list) you have


list.length

More fun overall ( ;) )


I would be interested to hear others opinions on Ruby, especially compared to Python.

*Also feel free to argue or correct any misinformation on any of my points. I'm here to learn, not to flame.*

oldmanstan
February 28th, 2006, 03:02 AM
I think I probably have about the same level of programming knowledge as you (given your description) and I've been playing around with ruby in my spare time. I have also been looking at python with the goal of learning one of them. So far I agree, I like ruby better for basically the same reasons. I figure that if i'm going to use OOP it might as well be as complete as possible. Also I find it much easier to use and remember methods attached to objects as opposed to functions. Not really sure why but it's true.

Jessehk
February 28th, 2006, 09:31 PM
Unfortunately, Ruby doesn't really seem to have garnered a lot of support yet. I might have to stick with Python for this reason alone.

gord
February 28th, 2006, 09:45 PM
your opening pandora's box, close it quick before hope escapes!

generally you either like python for its virtues or you like ruby, and never the two shalt mix. or of course you don't like either for whatever reasons.

ltmon
February 28th, 2006, 10:51 PM
Hi,

I have done a lot of Python, Java, C++ and PHP ... and now that I know ruby I think it's a better language than them all.

Note: I said better language, not better or more complete libraries and support. That's a different thing.

I just love the complete consistency of it. You only have to learn a few rules and the whole language is practically learnt.

Also I find it very concise but readable.

Cheers,

L.

oldmanstan
March 1st, 2006, 12:33 AM
yeah, good points... to add to what i posted earlier i think the fact that python is better supported in terms of resources and documentation is a definite positive. i've had a hard time getting info and reference stuff on ruby. the fact that it is so OO sort of hurts it in terms of reference material, there are tons of object references but when i needed the syntax for an if-then statement i had to hunt like crazy for it.

not to say stuff isn't out there but it is a little harder to find. also, i think ruby on rails is sort of crowding out plain ruby in some sense. as evidenced by the title of this post, you have to qualify references to ruby because people assume it's on rails...

just some thoughts, take em or leave em