Thoughts on Ruby as a first language

Need help with C, C++, perl, python, etc?

Thoughts on Ruby as a first language

Postby dmsynck » 2006-04-13 01:02

Hi all,

Just wanted to get opinions/suggestions on Ruby as a first language. I have played with Python a little bit, so I thought Ruby would make a good choice since it is very similar, but is pure OOP.
dmsynck
 
Posts: 3
Joined: 2005-10-07 02:06

Ruby first?

Postby jmitch » 2006-05-15 07:32

You could get a million replies on this one and they will be hearty answers full of reasons for and against.

The smart opinions will ask what you are thinking of doing with programming while fanatics will swear by the languages they know.

I started with Ruby not too long ago and found its syntax and documentation sufficient to get started. It's clean and forgiving and the object oriented concepts you learn in Ruby are applicable to other OO languages (although you might suddenly miss some of the shortcuts ruby gives you!).

Generally, people on the 'C' language side are going to tell you that scripted languages are slow and hog memory. Programmers with Java, Perl and Python will also claim higher speed, and for the most part they are right, too.

When it comes to enjoying programming and turning out code faster, that's where Ruby starts to pick up it's momentum. A great deal of the 'speed' related issues are about to be resolved in YARV (Yet Another Ruby Virtualizer) although I think it has a more official name now, it's supposed to speed up Ruby to the point of Python/Perl language speeds. C will almost always be faster unless you get down to assembly languages.. which I would never want to start with (machine code... not english friendly in the slightest).

So the answer is... it depends on what you want to do. Just looking for a hobby? Perl/Ruby are great starting languages with clean syntax... Ruby being even cleaner in my opinion.

In the life of a programmer, it isn't uncommon to learn several languages over time, so any starting point is exactly that... a starting point. Ruby will give you some early successes and make you feel like you can read code... then when you go to something else.. it will be a little painful but oddly familiar. That's my two cents.
jmitch
 

Postby shevegen » 2006-07-22 08:49

Just wanted to get opinions/suggestions on Ruby as a first language. I have played with Python a little bit, so I thought Ruby would make a good choice since it is very similar, but is pure OOP.


Ruby is the way how perl should have been in my opinion.
Both Python and Ruby beat Perl IMHO.

Python has a big advantage in that it has a larger userbase in the "western" world, including some benefit such as big documentation reservoir.
The IRC channels on freenode are quite full, I'd say ruby has around 400 on #ruby-lang, python has a bit more.

Ruby sometimes suffer documentation. Its annoying when google brings you to japanese-only pages, and its annoying if you search through ruby RAA (this is similar to Perl's CPAN) and find a good library but unfortunately it lacks documentation.

Also some game engines prefer to use Python over Ruby, I dont think its because of any real reason at all - other than that the C++ guys just know Python, and dont know Ruby.


I am using Ruby because of the clean syntax and very elegant grammar. I compared it to python on many occasions but some solutions in Python just annoyed me more than in Ruby, which are the whitespace matters part, and the implicit (self) as reciever (which is TOTALLY annoying for any OOP model).

Mind you, both ruby and python are nice. Perl is showing its age though.

Pick ruby or python, it doesnt matter. Both will save loads of time to get problems solved without the need to write C code. (But if you have the time, learn both languages. AND learn C. In the long run, there is no way around C for anyone that spends a lot of time with programming languages. C is damn fast and very practical)

Btw rails is not ruby. I never picked ruby because of rails, i picked it up because I needed a general purpose langage, and php is not designed to handle this task (in fact, I would say, php is the worst designed language ever. The devs hardly care about beauty. You will understand the difference if you write beautiful code in either ruby or python) :>
shevegen
 
Posts: 5
Joined: 2006-07-22 08:44

Postby jdonnell » 2006-08-11 21:29

I'd go with either ruby or python. You'll be fine either way.

If I had to recommend one or the other then I'd say if you plan to do websites use ruby (rails is great). If you work on windows often use python, it has much better windows support. If neither of those are true then flip a coin :)

Ruby and python are much better for learning because you can create working apps much soon and get more immediate satisfaction. This will keep you motivated.
jdonnell
 
Posts: 7
Joined: 2006-08-08 21:15


Return to Programming

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable