Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Perl vs. Python: Looking at the Code

by jepri (Parson)
on Apr 03, 2002 at 16:51 UTC ( #156349=note: print w/replies, xml ) Need Help??

in reply to Perl vs. Python: Looking at the Code

Jepri climbs into his asbestos suit. It really looks like princepawn posting under a different name. Ho hum, flame away...

I just spent 4 hours trying to teach someone Eiffel, which is a B&D language par excellence. Interestingly enough, you could replace 'Python' with 'Eiffel' in your post, and you would have similar arguments like:

No sigils for variable access - brilliant. Now beginners can't tell the difference between a scalar, an array and a function. And then they can't tell if they will be interpolated in a string. Sigils on variables indicate what they will do when the code runs. Declarations 3 pages away aren't very helpful. Ditto C, Pascal and every other damned language without sigils, including Python.

No delimiting of blocks with () or {} signs - so you have to look at what isn't there to tell where the block starts and ends. In any conditional more complex than  x < 10 , you are probably going to use brackets to override precedence, or simply because you can't remember which operator wins. So beginners ask, why do you need brackets sometimes and not other times... Again, teaching beginners is more difficult, because there are less clues as to what is a statement and what is an expression.

The perl way of taking arguments is pathological. Point to you.

Object accessors - I just spent four hours with someone who kept typing io.put.integer rather than io.put_integer Operators that look like punctuation suck.

Multiple implementations of the same language - so now, not only do you have to keep track of different hardware platforms, you have to be aware of how each implementation works on each platform.

Update: I guess the point I didn't make explicit before is that if I can replace 'Python' with 'Eiffel' or any other word, or 'Perl' with 'C++' or 'Ada' or whatever then we aren't argueming languages, we're arguing language design features, independent of the languages that use them.

This is a sizeable area of research, and thankfully the researchers are beyond pointing at their favourite language and saying "Look! Whitespace!". I will be interested to see how well perl6 incorporates academic theories into a current programming language.

I didn't believe in evil until I dated it.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://156349]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2019-02-20 03:09 GMT
Find Nodes?
    Voting Booth?
    I use postfix dereferencing ...

    Results (105 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!