Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

comment on

( #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

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

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (8)
    As of 2019-10-16 21:58 GMT
    Find Nodes?
      Voting Booth?