Perl vs Python vs Ruby

  • Thread starter it_says_BALLS_on_your forehead
  • Start date
I

it_says_BALLS_on_your forehead

I was skimming over slashdot, and came across a somewhat heated
debate over the virtues and vices of Perl in relation to Ruby and
Python.

I checked out Python, and it seems ok. the syntax (from cursory
inspection) seems clean, and i've heard Python is very lightweight. I
don't like the fact that white space restricts the code. I read that
this poses issues with embedding Python in HTML pages.

People claim that one of the major flaws of Perl is its 'line noise'
(i think this refers to the $, @, %, etc). Personally, i like these
symbols as they describe a variable in an intuitive and simple manner.
scalars start with a symbol that looks like an 's' ($). arrays start
with a symbol that resembles an 'a' (@). hashes are represented by a
symbol which seems to relate one element to another (%). by glancing at
a variable, you can immediately tell it's type. although some would
argue that you should be able to tell a variable's type based on its
context anyway, this isn't always true, since amiguities do exist. and
while these symbols don't *perfectly* describe at-a-glance what the
variables are, they do help.

I also looked at Ruby, and that language looks very foreign to me. I
don't really know enough to comment on it, but I do know that Perl has
a much larger community that is devoted to maintaining and improving
the language. plus CPAN is a huge resource for Perl users. i don't
think Python or Ruby have anything comparable.

anyway, so what's with all the brouhaha about Python and Ruby?
 
P

Paul Lalli

it_says_BALLS_on_your forehead said:
anyway, so what's with all the brouhaha about Python and Ruby?

How about you search groups.google for the hundreds of previous flame
wars in c.l.p.m, c.l.python, and c.l.ruby, rather than starting a new
one?

Paul Lalli
 
I

it_says_BALLS_on_your forehead

Paul said:
How about you search groups.google for the hundreds of previous flame
wars in c.l.p.m, c.l.python, and c.l.ruby, rather than starting a new
one?

Paul Lalli

it wasn't my intention to start a flame war. i noticed *recent*
dialogue about this subject, so was curious about it.
 
D

Dr.Ruud

Tim Hammerquist:
I really like the idea of
significant whitespace. But maybe that's just from all the Perl
code I've seen that sits flush with the left margin... all 600
lines of it.

perltidy unless hardcopy
 
I

it_says_BALLS_on_your forehead

Tim said:
The recent isn't significantly different from the previous.

For the record, however, while I don't find the Python language
itself terribly useful in my work, I really like the idea of
significant whitespace. But maybe that's just from all the Perl
code I've seen that sits flush with the left margin... all 600
lines of it.

Tim Hammerquist

thanks. i appreciate your comments :).
 
C

Chris Barts

October 2005 07:56 in comp.lang.perl.misc
I was skimming over slashdot, and came across a somewhat heated
debate over the virtues and vices of Perl in relation to Ruby and
Python.

I checked out Python, and it seems ok. the syntax (from cursory
inspection) seems clean, and i've heard Python is very lightweight. I
don't like the fact that white space restricts the code. I read that
this poses issues with embedding Python in HTML pages.

The whitespace isn't an issue for most people, because it is how sane people
indent their code anyway. Think of it as a 'minimum standard for
readability.'
People claim that one of the major flaws of Perl is its 'line noise'
(i think this refers to the $, @, %, etc). Personally, i like these
symbols as they describe a variable in an intuitive and simple manner.
scalars start with a symbol that looks like an 's' ($). arrays start
with a symbol that resembles an 'a' (@). hashes are represented by a
symbol which seems to relate one element to another (%). by glancing at
a variable, you can immediately tell it's type. although some would
argue that you should be able to tell a variable's type based on its
context anyway, this isn't always true, since amiguities do exist. and
while these symbols don't *perfectly* describe at-a-glance what the
variables are, they do help.

I agree fully, with the exception that @array -> $array[0] is somewhat
irrational, and that being able to use %foo, @foo, and $foo as unrelated
variables in the same program is insane.

But all programming languages allow some degree of insanity.
I also looked at Ruby, and that language looks very foreign to me. I
don't really know enough to comment on it, but I do know that Perl has
a much larger community that is devoted to maintaining and improving
the language. plus CPAN is a huge resource for Perl users. i don't
think Python or Ruby have anything comparable.

Ruby is closely related to Smalltalk and Lisp. If you don't know either of
those languages, and you should learn them, Ruby will indeed look foreign
to you. (Personally, I think it's a very elegant language.)

And you are right that very few languages have anything comparable to CPAN.
Hopefully, with Parrot becoming a common backend to these languages CPAN's
wealth will spread to programmers who like quality code but don't enjoy
programming in Perl.
anyway, so what's with all the brouhaha about Python and Ruby?

What's with all the brouhaha about Perl? Everyone has his own preference and
every project has its own demands; programming languages have to fit both,
thus the proliferation of languages that are in many ways actually quite
similar.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top