473,698 Members | 2,298 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What's TOTALLY COMPELLING about Ruby over Python?

I'm realizing I didn't frame my question well.

What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump
up in your chair and scream "Wow! Ruby has *that*? That is SO FRICKIN'
COOL!!! ***MAN*** that would save me a buttload of work and make my life
sooooo much easier!"

As opposed to minor differences of this feature here, that feature there.
Variations on style are of no interest to me. I'm coming at this from a C++
background where even C# looks like an improvement. ;-) From 10,000 miles
up, is there anything about Ruby that's a "big deal" compared to Python?

One person mentioned Japanese documentation. I'm sure that's Totally Kewl
to the Japanese....

--
Cheers, www.3DProgrammer.com
Brandon Van Every Seattle, WA

20% of the world is real.
80% is gobbledygook we make up inside our own heads.

Jul 18 '05
54 6552
John Roth wrote:

"Peter Hansen" <pe***@engcorp. com> wrote:
What is it about code blocks that would let "save *me* a buttload of work
and make *my* life sooooo much easier"?


It's not so much code blocks. It's that Ruby's syntax gives you one code
block for
free in every method call. And the Ruby library is organized so that the
facility
is useful, which Python's isn't (or at least, it isn't as useful.)

All of the Ruby collections implement a .each method, which is essentially
a version of the Visitor pattern. If I want to do something to every element
in a list or a dict (or any kind of collection,) all I have to do is say
something
like (using Python syntax):

collectObj.each (<method name>)

In Python, that's either a lambda (which restricts what you can do with it,)
or a named function (which is overkill a huge amount of the time.) And you
have to worry about distinctions between functions and methods. In other
words, it's a mess compared to Ruby.

Now, you can say: "We've got that with map()." Well, we've got it when
your inputs are either lists (or implement the correct protocol) but the
result is a list, it's not an internal modification to the object's state.

You can also say: we can do that with for. Well, duh. For is a
statement, not a method call.


So what you seem to be saying is that Ruby has some features which
in some cases can save some time or somewhat simplify code that when
written in Python would take slightly longer or be slightly more
complicated. (This probably underemphasizes the value you place on
such a thing, but I think that's the gist of it.)

While I do acknowledge that Python is often touted as a great solution
over other languages just because it saves time and simplifies the
resulting solutions, I'm not clear on why these few small differences
would amount to a *TOTALLY COMPELLING* reason, to anyone, to use Ruby
over Python.

-Peter
Jul 18 '05 #11
[John Roth, among others, wrote]

[Snip: Some stuff about good things that Ruby does]

As someone who has never seen or written a line of Ruby, I find it
most interesting that of all the positive points being made about
Ruby, no-one has posted a single line of Ruby code.

Whenever people are making points about python, they usually post
illustrative snippets of python. Fair enough, it's a python newsgroup,
so maybe Ruby code doesn't belong.

But I am interested to read others opinions of what Ruby has/does that
python hasn't/doesn't. The support for continuations certainly sounds
interesting. Some code snippets would really help, for illustrative
purposes.

but-python-does-almost-everything-that-*i*-need-ly y'rs.

--
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan: http://xhaus.com/mailto/alan
Jul 18 '05 #12
Andrew Dalke wrote:
Brandon J. Van Every:
What's ***TOTALLY COMPELLING*** about Ruby over Python?
Nothing.

I think several people have been very explicit in saying
that Ruby has some advantages over Python, and vice versa,
that in most cases it's a wash, but that there's nothing 'TOTALLY
COMPELLING" about Ruby.


That's the answer I was expecting to hear.
You need to acquire critical reading skills.
No I do not. I was seeking clear verification, and I got what I was looking
for. I suggest that you need to acquire imagination skills. You can't seem
to wrap your head around legitimate reasons for asking a question.
And this sort of post is making your troll mark almost indelible.


I'm tired of knee-jerkers like you. Welcome to my killfile!

--
Cheers, www.3DProgrammer.com
Brandon Van Every Seattle, WA

20% of the world is real.
80% is gobbledygook we make up inside our own heads.

Jul 18 '05 #13
Jeff Epler wrote:
Of course, without Python users, he wouldn't have much fun,
would he, with nobody stupid enough to stand up to defend Python and
"get trolled". So even the troll should be glad that there's nothing
"totally compelling" about Ruby over Python.
I don't want to get sucked into an issue that I have little to no interest
in. So I will observe rhetorically: some of you people waste a *lot* of
energy on games of "who's a troll." Mabye it's time for you to establish a
c.l.p.advocacy newsgroup, to siphon those energies in a particular
direction? But hey, it's your newsgroup.
Jeff
PS I'd just like to state for the record that neither Python nor Ruby
have a totally compelling advantage compared to the following

K&R C


Even as one who hasn't converted to Python yet, that statement is clearly
insane.

--
Cheers, www.3DProgrammer.com
Brandon Van Every Seattle, WA

20% of the world is real.
80% is gobbledygook we make up inside our own heads.

Jul 18 '05 #14
Patrick Useldinger wrote:
Brandon J. Van Every wrote:
What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes
you jump up in your chair and scream "Wow! Ruby has *that*? That
is SO FRICKIN' COOL!!! ***MAN*** that would save me a buttload of
work and make my life sooooo much easier!"


The simple fact that *you* are not active on c.l.ruby?
A time-saver, certainly ;-)


I wonder how large my c.l.p killfile is now?

--
Cheers, www.3DProgrammer.com
Brandon Van Every Seattle, WA

20% of the world is real.
80% is gobbledygook we make up inside our own heads.

Jul 18 '05 #15
Istvan Albert wrote:
Erik Max Francis wrote:
What's ***TOTALLY COMPELLING*** about Ruby over Python?
comp.lang.ruby doesn't have Brandon Van Every.


Erik has been in my killfile forever, from other newsgroups. I even had to
put him back in after letting him out. I thought a year would have been
enough, but apparently not.
LOL

Istvan.


So, you're guilty by association. Goodbye!

--
Cheers, www.3DProgrammer.com
Brandon Van Every Seattle, WA

20% of the world is real.
80% is gobbledygook we make up inside our own heads.

Jul 18 '05 #16
Brandon J. Van Every wrote:
I wonder how large my c.l.p killfile is now?


Humour is a sign of intelligence; being able to joke about oneself even
more so. Try it!
;-)

--
Real e-mail address is 'cHVAdm8ubHU=\n '.decode('base6 4')
Visit my Homepage at http://www.homepages.lu/pu/

Jul 18 '05 #17
"John Roth" <ne********@jhr othjr.com> writes:
[...]
It's not so much code blocks. It's that Ruby's syntax gives you one
code block for free in every method call.
I don't know what that means. Care to explain a bit more?

[...] All of the Ruby collections implement a .each method, which is essentially [...] like (using Python syntax):

collectObj.each (<method name>) [...] You can also say: we can do that with for. Well, duh. For is a
statement, not a method call.
I don't understand. Why does this matter?

I guess you could implement this in Python if you had a burning
desire, using __metaclass__ (caveat: never having had such a desire,
I've never used metaclasses, so I may be wrong).

To continue on this vein, Ruby directly implements Visitor, Observer,
Delegate and Singleton. I don't particularly like the way it does some
of them, but Python can't claim any one of the four!

[...]

And so...?
John
Jul 18 '05 #18
"Brandon J. Van Every" wrote:
Erik has been in my killfile forever, from other newsgroups. I even
had to
put him back in after letting him out. I thought a year would have
been
enough, but apparently not.


There's been at least four of five times where Brandon has claimed to
have put me in his killfile; he keeps "forgetting ." Not that that is
terribly surprising coming from someone who is so fond of telling people
about the contents of his killfile.

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ \ I want a martini that could be declared a disaster area.
\__/ Capt. Benjamin "Hawkeye" Pierce
Jul 18 '05 #19
Brandon J. Van Every wrote:
Andrew Dalke wrote:
Brandon J. Van Every:
(snip)
And this sort of post is making your troll mark almost indelible.

I'm tired of knee-jerkers like you. Welcome to my killfile!


Lol ! A certified troll killfiling regular posters ! At this point, it
becomes something like Mastery - with a great 'M'.

Bruno

PS : Brandon, please make my day and tell me : did I won my place in
your killfile too ?-)

Jul 18 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.