everyone else thinks I should learn Python. It is cleaner, more directly readable, has built-in OO, is more popular, and has a new version already in use.
I am not a pythoner. I've never learned it. However, my knowledge of other languages, especially Perl, has allowed me on occasion to hack some 3rd party python code with some success. Your (or perhaps your correspondents') criteria listed above for advocating python over Perl do need to be debunked.
- It isn't immediately clear what you mean by cleaner - maybe it's the syntax, maybe it is the minimalism of the language itself, maybe it is that it does not pollute the rest of the O/S, who can say? Whatever, it sounds very subjective. The only way for you to know which is really cleaner (for whatever your definition of "cleaner" is) would be to try both a see which floats your boat.
- I have found Perl to be a very readable language, at least for a native English speaker such as I am. Many of the perlvars are mnemonic, most of the built-ins are English words and lots (although not all) of the syntactic sugar is C-like. Conversely the python which I have read has been difficult, mostly because of the significant whitespace instead of closing braces, etc.
- What on earth made you think perl doesn't have built-in OO? Genuinely curious here, as a simple google search for perl OO turns up about six million results. Perl is equally happy as a procedural, object-orientated or functional language.
- Ah, popularity, how shall I measure thee? Let me count the ways. Or did you mean populist? Or in vogue? And, when push comes to shove, what does popularity matter compared to getting the job done (and done well and quickly and maintainably)?
- When is a version a "new" version and when is it not? Current version of perl is 5.18 released on the 18th of May this year. Current version of python is 3.3.2 released on the 15th of May (ie. 3 days older). Furthermore, Perl is stable with excellent backwards compatibility to 5.10 and a large chunk of today's code will run quite happily on 5.6, which is over 13 years old now.
I'm sure that there are many good reasons to learn python. There may even be some good reasons to learn python in preference to Perl, but your stated ones are either subjective or easily dismissed.
Learn Perl. It's a steep curve. As others have said you have a big head start because of sed and awk and C. Perl brings the best of all of those together and a whole heap of magic of its own. I haven't looked back and nor, I suspect, will you. Good luck.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- 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
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||