Friday, 31 December 2010

Ruby, Python and 2011

Well, after playing a little with both Python and Ruby, I must say, I really like both languages.. However, I'm leaning towards Ruby with it's native OO benefit. Like, everything is OO.
That being said, should I do the project in Ruby, I'll definitely do another site in Python too, as I see it a definite worthwhile language to have too!

Also, had a great idea for a simple Android app... So lots happening in the new year!
I'm SO glad I haven't heard any year rhymes for 2011... I used to hear them each year: 2009 (something something divine), 2008 (something something great)... bleh.. I'm sure someone out there has used "heaven", "leaven", or something. I don't wanna know! haha

Have a good rest of 2010 - catch you next year!

4 comments:

dilipm79 said...
This comment has been removed by the author.
dilipm79 said...

I always here on ruby that it has native OO benefit..everything is OO.
BUT I NEVER UNDERSTOOD. I know bit a python and it's an excellent lang. But I don't advocate any lang :). its a personnel taste.

Can you really explain with example what benefit that ruby's OO has over Python's OO?

Cheers, DM

Billy Einkamerer said...

Well, (and all this needs to be checked up because it's what I've been told)...

I've heard that Python is super fast compared to PHP, but a PHP friend told me that only procedural python is blazing fast, that PHP's OO implementation is faster. But I've worked in PHP's OO and the syntax just feels klunky and afterthought.

I really like Python, and have made a resolution to learn both Python and Ruby this year, but in playing with Ruby, there's an interesting dynamic that i've never encountered before. even if I make a flat numerical variable, it's treated as an object. and a string is an object.

So, to answer your question, apparently Python's OO execution is slower that it's procedural stuff, and Ruby's OO is more pervasive (I don't actually yet know the benefit of that).

Sorry that this is a bit of he said she said and not so scientific... I agree with you on the personal taste thing.

dilipm79 said...

there's an interesting dynamic that i've never encountered before. even if I make a flat numerical variable, it's treated as an object. and a string is an object.

In python:

>>> x=2 ; flat variable
>>> isinstance(x,object)
True

So 2 in an instance of an object. :)

There is very good explanation btw Ruby and Python which I myself did not understand much. Someone who had coded for some 2-3 yrs would understand it.

http://dev.pocoo.org/~mitsuhiko/pythonruby.html#ruby-first-class-functions

I choose Python for its simplicity, syntax and last but not least. http://www.python.org/dev/peps/pep-0020/

When you write 1000's of lines, the above would really make sense. [.. my opinion]

All the best for your learning and am really curious to know your opinion on both after some months!

Good luck again!