Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
This is an old, old thread, but I feel like throwing in two cents, since I've recently been seeing how Python feels. And it feels strange. Not necessarily bad, just strange.

First, it doesn't give you many hypotenuses. Don't get me wrong, there are some nice shorthands, to be sure -- the slice syntax is cool and could be borrowed -- and its object-orientation is politically correct and (more importantly) doesn't look bizarre. And its treatment of Strings as Lists is, in the long view, probably correct. However, I've seen no other syntax benefit so far over Perl, and in fact that pales in comparison the cool shortcuts that Perl gives for free. And the CPAN sweatshop, where you can Find It's Already Been Done For You.

Moreover, there are some things that would be sorely missed if I had to use Python for some jobs. In particular, it feels too far removed from closures. This is purely a side-effect of not using explicit block delimiters, I suspect. The lack of Perl's concise range operator is painful to me. There's also a slight whiff of Java about when I code in Python. And any niceness in syntax is nullified by some very strange things which will, due to frequent usage, bother me all the time, such as the trailing comma on the print statement! What's the problem here? Why can't you use \n, or at least bow to Java and have print() vs println()?

And, though I haven't delved deeply into it, variable interpolation in strings looks painful in Python. Isn't the C language 30 years old now?

Next, there are a couple things I'm waiting for in Perl6. In particular, a more sensible way of declaring, creating, and handling objects and object methods. Python captured the essence of quiet object-orientation. And I'm all for the loose mixin-like behavior of Perl6 (and Ruby) too. And, already explicit is the ability to change Perl to what you want it to be via predeclaration. All is fair if you predeclare is my mantra. (You can even do that now in Perl5 with source filtering.) If I want to steal some hacks from Arc then I can predeclare them in my Perl modules. This is a big win.

To sum up, basic Python is just a hybrid Perl-Java-LISP language which appears to bring little that is new. And while I love Perl, respect Java, and like LISP, and think emulating them to some degree is admirable and even worthwhile, I still get the feeling that I'd rather have the "value" (if that can be assessed) of Java and LISP without sacrificing Perl.

I think it's time to put Python back on the shelf, and see what Ruby feels like.

In reply to Re: Perl vs. Python: Looking at the Code by rje
in thread Perl vs. Python: Looking at the Code by mothra

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-25 19:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found