Talk:Python vs Ruby

From WikiVS, the open comparison website
Jump to: navigation, search

So cool! Thanks.

I think it has a little bias towards Ruby. ;)

I think it dismisses the popularity of JavaScript. 91.183.43.136 14:47, 2 March 2011 (UTC)


- I disagree about Ruby bias, the article is making claims about Python being more popular, when in fact Python has declined in popularity over the past 3 years, mostly due to uptake in Ruby and Javascript popularity with Rails and Node.js. But that may be more a slip away from Django to the web frameworks provided by Ruby and Javascript, and the seemingly ubiquitous uptick in popularity of GitHub, which definitely leans towards Ruby. I would argue that Javascript's popularity is owed almost entirely to it's universal availability in web browsers, and the fact that most new coders first experience programming thru the browser and their interaction with web pages. Javascript is still a horrible language (syntax), with lots of pot holes that need to get patched up. Ruby has a very pleasant syntax, and very easy to use dependency version management thru rubygems and bundler. Python's easy_install and PIP came first, but it's usability pales when compared to rubygems. The only annoying syntax in Ruby is the statement block "end". But there's plenty of issues with crufty syntax in Python, like if __name__ = "__MAIN__", come on... really?


I can't believe that nobody's mentioned the difference in length. When I write Ruby, I find that it's always 33% shorter than Python.


[edit] Instance methods

It should perhaps be noted that Ruby has 'real' instance methods while Python has not ( nor Perl OO ). In Ruby a class instance object can be extended to have a particular method unique to that instance not shared with other instances from the same class. The syntax is clear and straightforward. Python's instance methods are shared by the instances of the class as in most languages. Python has a workaround that results in extending the instance with a particular method or a hash can be encapsulated in the class objects storing the unique methods. Neither is straightforward.

[edit] Ruby - Haskell

Ruby can be extended with Haskell that can be a great pro. See: http://www.engineyard.com/blog/2010/a-hint-of-hubris/

[edit] Style

"Unlike most 'C' derived languages, the boolean expression A < B < C is evaluated in Python as it would be mathematically. That is, it means A is less than B and B is less than C."

This statement is fine, but it doesn't say why that's unique - how do most 'C' derived languages treat that expression?

Personal tools
Namespaces
Variants
Actions
Navigation
Ads
Toolbox