What's TOTALLY COMPELLING about Ruby over Python?

  • Thread starter Brandon J. Van Every
  • Start date
B

Brandon J. Van Every

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.
 
D

Dave Brueck

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!"

Nothing.

-Dave
 
D

Daniel Dittmar

Brandon said:
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!"

Code blocks, although I'd rather go to the source and steal them from
Smalltalk.

Python now has most of the parts to implement code blocks, perhaps not
exactly like Smalltalk, but enough to make them useful. What is lacking
is a syntax to be able to create lambdas with multiple statements. And
perhaps a syntax without using the keyword lambda, as some people seem
to have an allergic reaction to it.

Daniel
 
P

Peter Hansen

Daniel said:
Code blocks, although I'd rather go to the source and steal them from
Smalltalk.

What is it about code blocks that would let "save *me* a buttload of work
and make *my* life sooooo much easier"?

If one can't answer that, one shouldn't expect to be able to answer whatever
the heck it is Brandon has in mind (which is clearly not much), since
only he has any idea what it is he wants, and we're not even sure about that...

-Peter
 
E

Erik Max Francis

Brandon J. Van Every said:
I'm realizing I didn't frame my question well.

What's ***TOTALLY COMPELLING*** about Ruby over Python?

comp.lang.ruby doesn't have Brandon Van Every.
 
P

Patrick Useldinger

Brandon said:
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 ;-)
 
S

Skip Montanaro

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

Apparently, not much in this crowd, otherwise most of us would have switched
to Ruby by now. Try asking the Ruby folks. They will probably be able to
come up with some answers for you.

Skip
 
J

John Roth

Peter Hansen said:
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.

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!

Granted, you can do a clean singleton using new style classes and the
__new__() method, but (as of 2.3) it's not anywhere in the core
documentation
that I could find. Observer is simply a couple of classes. Visitor I've
discussed above, and I'll leave Delegate for the reader.
If one can't answer that, one shouldn't expect to be able to answer whatever
the heck it is Brandon has in mind (which is clearly not much), since
only he has any idea what it is he wants, and we're not even sure about
that...

It might be better to simply take the question at face value, rather than
slanging Brandon. I don't find the personalities to add anything of value
to the conversation.

John Roth
 
H

Henk Burgstra

And this sort of post is making your troll mark almost indelible.

Brandon is not a troll. He is very serious in his quest to find a good
'alternative' language. Look him up on Google.

Regards,
Henk Burgstra
 
P

Peter Hansen

John said:
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
 
A

Alan Kennedy

[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.
 
B

Brandon J. Van Every

Andrew said:
Brandon J. Van Every:

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.
 
B

Brandon J. Van Every

Jeff said:
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.
 
B

Brandon J. Van Every

Patrick said:
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.
 
B

Brandon J. 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.
 
P

Patrick Useldinger

Brandon said:
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!
;-)
 
J

John J. Lee

John Roth said:
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
 
E

Erik Max Francis

Brandon J. Van Every said:
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.
 
B

Bruno Desthuilliers

Brandon said:
(snip)


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 ?-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top