DenkzeitWiki

Suchen:

Aktuelle Änderungen Printable View Änderungen Bearbeiten

SharpDevelop > JavaGenerics > StartOfEpoch > VisualStudio > Abstractions > OliverSteele > WikiHelp > StaticTyping > SExpressions > HeapAndStack > SQLInjection > CodeInjection > AlexMartelli > ClojureHacks > DenkzeitWiki > ChoosePython > PythonVsRubyClear Trail
Main /

Python Vs Ruby

Python
Ruby

LanguageWars
PythonVs

Also, Python strives for readability. I feel the existance and popularity of Ruby has been a net positive for Python, because it keeps programmers who don't greatly value readability away from our Python codebases.


Ruby is to Perl what C++ was to C. Ruby improves and simplifies the Perl language (the name "Ruby" is even a tribute to Perl), and adds workable OO features (If you've ever tried to use classes or references in Perl, you know what I'm talking about. I have no idea whether Perl 6 will rectify this or not, but I stopped paying attention long ago). But it also seems to carry forward some of the Perl warts. For anyone used to, and tired of, Perl, this certainly seems like a huge improvement, but I'm tired of all impositions by a language upon my thinking process, and so arbitrary naming conventions, reversed syntax and begin-end statments all seem like impediments to me.[1]

Technologies, especially programming languages, do not win on merit. They win on marketing.

What about Python? Is Python hip, funny, and fun? Not really. The community is serious, earnest, mature, and professional, but they're not much focused on fun, which is an important part of marketing languages.

The battleground is the web framework space, and Python's screwing it up badly.

One *objective* thing I can point out, though, is that Ruby has become popular largely due to a single application (Ruby on Rails), whereas Python has been entrenched in many disciplines, from science and mathematics, to journalism, to Web development, to data manipulation/analysis, for a while now. There's a lot of great, free Python code out there.[2]



Below a thin veneer of syntax differences, I find Ruby and Python amazingly similar -- if I was computing the minimum spanning tree among just about any set of languages, I'm pretty sure Python and Ruby would be the first two leaves to coalesce into an intermediate node:-). [3]

  • in Ruby a method with no arguments is called without the paranteses: method, whereas in Python and most other languages it is method()). Doing method in Python results in a method-object.

Again, people who consider having a lot of similar but subtly different things at the core of a language a PLUS, rather than a MINUS, will of course count these "the other way around" from how I count them:-). [in favor of Python]

  • Nice excursion into spaghettini

For the purposes of metaprogramming, implementing experimental frameworks, and the like, this amazing dynamic ability of Ruby is _extremely_ appealing. BUT -- if we're talking about large applications, developed by many people and maintained by even more, including all kinds of libraries from diverse sources, and needing to go into production in client sites... well, I don't WANT a language that is QUITE so dynamic, thank you very much.

  • Both languages are quite more dynamic than most others. Ruby is even more dynamic than python, though.


'm curious what "warts" you have experienced with Python. I'm also curious whether perhaps you haven't used Ruby enough to *find* the warts yet. ;)
For me, the one minor nicety that Ruby has that Python doesn't is Smalltalk-style code blocks. But, there are so many things that Ruby does that are a step backwards from Python, that the trade isn't anywhere near worth it.
For example, Ruby allows modification of built-in types, which is a horrendous *mis*feature for application scalability. It's one of those things that sounds like a good thing until somebody actually does it. Then you wind up with two libraries that modify a builtin type in different ways, but your app really needs to use *both* libraries. Then where are you?
Also, I find Ruby syntax to be almost as ugly as Perl, and of course there's the libraries issue. If the language itself multiplied my productivity enough to make up for those issues, that'd be one thing. But the only thing I've seen in Ruby that's not in Python is blocks, and they're just not that much of a productivity booster relative to using closures in Python.
In short, my reaction to Ruby is basically, "Why bother?"[4]









PythonSelf

In Ruby, everything is a method, or an anonymous block, and there are no "free functions". Python uses the complimentary approach, treating functions as first-class citizens. [5]


DSL

pervasive DSL fetish (which in Ruby seem to be the usual excuse of badly dressing up a programming language and pretending a lot)[6]



DjangoVsRails?


Edit - BackLinks - Tags - Page Hist - Print - Changes - Home - Orphans - Help

Zuletzt geändert am 17.06.2008 22:01 Uhr und seit 7. April 2005 1629 aufgerufen.