Python vs Ruby

A

Andy Leszczynski

Steven said:
Every line = more labour for the developer = more cost and time.
Every line = more places for bugs to exist = more cost and time.

The place I work at the creation rate is not a problem - we could crank
out in the team 1000s lines a week. Most time we spend is on maintanance
.. This is where Pyton shines over Java/C++/Perl. It is easy to read thus
maintane.

A.
 
A

Andy Leszczynski

Amol said:
Hi. I am interested in learning a new programming language, and have been
debating whether to learn Ruby or Python. How do these compare and contrast
with one another, and what advantages does one language provide over the
other? I would like to consider as many opinions as I can on this matter
before I start studying either language in depth. Any help/comments are
greatly appreciated. Thanks in advance for your help.

How Ruby solves the problem of global interpreter lock?

A.
 
S

Steven D'Aprano

The place I work at the creation rate is not a problem - we could crank
out in the team 1000s lines a week.

Good on you. I assume those thousands of lines are good ones, and not
just churning out quantity instead of quality.

In any case, no matter how fast you are, you will be faster if you have
fewer lines to write.
Most time we spend is on maintanance
. This is where Pyton shines over Java/C++/Perl. It is easy to read thus
maintane.

Yes. Now imagine how much less maintenance you'd have to do with fewer
lines.

Of course, it is easy to take this to extremes. One thing which is a red
rag to me is when folks have written perfectly good, efficient, fast,
readable code in four lines, and then obsess "how can I write this as a
one-liner?". That way to the Dark Side goes: unreadable, cryptic,
unmaintainable, buggy code.

In any case, lines of code is a very poor metric for measuring programmer
productivity. I'm not even so sure it is better than nothing -- in some
cases, it is *worse* than nothing.
 
L

Lawrence Oluyede

Il 2005-10-27 said:
How Ruby solves the problem of global interpreter lock?

AFAIK Ruby does not have those kind of problems, it does not have "real" threads
but it emulates them via software
 
B

bellarchitects

bruno said:
It's been a long time since I last saw a Java applet on a website.

That can only mean you are ignorant.
Applets are a huge deal for Intranets. And Java Web Start is even more
useful. I really wish Python had such wonderful means of deployment.

bruno modulix wrote
Err... I wouldn't start another HolyWar, but Java is not that Object
Oriented. 'Class-based' would be more appropriate. Python, while not
being class-based (ie: it doesn't impose that all code goes into a
'class' statement), is much more an OO language than Java, since in
Python *everything* is an object - even functions, classes and modules.
This makes a *big* difference.

I think you are confusing terms. Class-based means that the language
uses classes and class inheritance and not object prototyping (as in
javascript):
http://en.wikipedia.org/wiki/Object_oriented#Prototype-based_models

And why should functions be objects ? Actually, this makes it less OOP
if we consider Smaltalk as being true OOP ;)
Python is here more pragmatic but less OOP, please try to remember it.

And haven't you heard of java.lang.Class or java.lang.reflect.Method ?
Classes in Java *ARE* objects. Or do you think all those static methods
and properties just pop out of the ground ? Voodoo maybe ? :)

The reason classes don't behave as objects is because that's only
usefull for reflection and meta-programming and that can be achieved by
using the java.lang.reflect package which IMHO it really makes sense
the way it was implemented.

bruno modulix wrote
Err... Python is more like what Java would have been if Java was a smart
dynamic hi-level object oriented language !-)

You see, I rarely see this kind of rubish on comp.lang.ruby. Shame on
you.
Do you realy think you are doing the Python community a favor by
bashing Java ?

<troll>
And yeah, LOC count is stupid. Productivity in general measured in LOC
is stupid. For that Java has a simple syntax which anyone can learn in
only a few hours (simpler than Python's ... a lot imho) and tools like
Eclipse, Netbeans, Studio Creator, JBuilder, etc ...
</troll>
 

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

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,108
Latest member
AlbertEste
Top