Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Python vs Ruby

Name: Anonymous 2011-09-25 10:21

What is better, Python or Ruby?

Name: Anonymous 2011-09-25 10:24

i fucked you're scripting
fuck off

Name: Anonymous 2011-09-25 10:27

Lisp. Lisp is the answer!

Name: Anonymous 2011-09-25 10:27

Haskell

Name: Anonymous 2011-09-25 10:32

That has to be stupidest of all holy wars ever to be waged in programming forums. That one, Python vs Ruby. Flip a coin, for Sussman's sake.

Name: Anonymous 2011-09-25 10:53

Python

Name: Anonymous 2011-09-25 10:58

While they are arguably around equally powerful and high-level, their underlying philosophies are quite different, which often leads to somewhat different idiomatic approaches.
Which one you find more appealing will depend on what you're used to, and how you like to think.

The most annoying thing about Ruby, IMO, is the converted Java programmers.
"Oh, wow, Ruby has [feature found in all sane languages], which means you don't have to [inane Java workaround for lack of such]! It must be the most productive language evah!!!1 All hailz teh railz!!"

Actually, on second thought, I'll generalize that:
The second most annoying thing about language X is the people who know only X and think it's the best thing ever.
The most annoying thing about language X is the people who only knew language Y, switched to the slightly less shitty X, and now think X is the best thing ever.

Name: Anonymous 2011-09-25 11:10

>>7
their underlying philosophies are quite different

they have basically the same underlying philosophy: make stuff look good without necessarily making it work good. Both are more geared toward making their syntax as pretty as possible and only considering semantics in terms of how it affects syntax.

The "one way to do it" versus "multiple ways to do it" is bullshit, because Python just fails at the former (its goal.)

Name: Anonymous 2011-09-25 11:23

Alright, I should really write that /prog/ proxy and filter out this kind of shit.

Name: Anonymous 2011-09-25 11:32

Would Perl be superior to both of those?

Name: Anonymous 2011-09-25 11:35

>>8
Both languages try to make the code look good, but what modern language doesn't?
In terms of distinctions in philosophy you have explicit/implicit, Ruby's love of syntax, which it inherited from Perl, and the monkey-patch approach it shares with Smalltalk.
Python on the other hand doesn't lend itself well to a functional style, with e.g. its hard statement/expression distinction, and its limited lambda functionality, which I'm guessing is what you were referring to with your "make stuff look good without necessarily making it work good" comment.

Name: Anonymous 2011-09-25 13:05

>>11
what I mean is that both are very concerned with syntax.
Ruby is all about letting you use dot-notation for stuff in ways that don't actually help, but "look good" to some people.

I mean, 5.times? Why not (times 5 (lambda ...))? Because it doesn't read as much like natural language. This is the primary reason.

And I would argue that Python's main goal is syntax. It doesn't include the ability to write large lambdas because of a syntax concern This has caused it to implement the list comprehension syntax. It also doesn't have what most people would consider proper closures because the syntax of having to call out what scope a variable lives in is not considered pretty, so instead they add the "nonlocal" keyword and blah blah

you get the picture. Python sacrifices semantic elegance to shallow syntactic "beauty" at the drop of a semicolon.

Name: Anonymous 2011-09-25 14:47

>>10
Shush, don't tell them yet. Suffering makes you stronger.

Name: Anonymous 2011-09-25 20:08

>>12
Right, I'll agree to both of those points. But 5.times is a kind of ``cuteness'' that you wouldn't normally find in Python. Python is a bit more autistic in that the organization should make theoretical sense, and they keep a pretty simple BNF while pursuing their goal of looking like pseudocode.

Ruby on the other hand, embraces cute hacks like ``5.times'' and ``3.seconds''. Any bit of magic you do to make a bit of a DSL is totally sweet. It also makes extensive use of anonymous functions in the form of blocks.

I'm saying that choosing one or the other is a matter of considering such differences and which approach you like the most, and not simply a coin toss.

If on the other hand you want to prioritize semantics, you'll want something like a Lisp (which has its own variants to consider), but Lisp code is ugly as fuck, and thus won't appeal to users of either of the two languages.

Name: Anonymous 2011-09-26 20:18

Python is saner than Ruby. Ruby is full of warts and ugly hacks.

Name: Anonymous 2011-09-26 21:59

now that ruby is faster than python, there is no reason to FIOC any more

Name: Anonymous 2011-09-26 22:59

Too bad Ruby is SLOW AS FUCK

Name: Anonymous 2011-09-27 0:01

>>16
Tell me more.

Name: Anonymous 2011-09-27 0:27

SLACKWARESUPREMACY

Name: Anonymous 2011-09-27 0:51

>>1
Ruby, because Python has no tail-call optimization.

Name: Anonymous 2011-09-27 1:08

Too bad Ruby is now FAST AS JAVA

Name: Anonymous 2011-09-27 1:15

Ruby

Name: Anonymous 2011-09-27 1:28

SLACKWARESUPREMACY

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List