5 ms·
Perl has been completely replaced by Python for me. Perl was the second language I learned in around 1995 after learning Turbo Pascal in my pre-teens. Perl allo
by hartror 15y ago
Perl has been completely replaced by Python for me. Perl was the second language I learned in around 1995 after learning Turbo Pascal in my pre-teens. Perl allowed me to learn the programming arts freely, the programs I wrote weren't pretty back then but they ran and performed a function. It let me experiment with CGI, GUIs and writing video games.
Thanks Perl. Pity you were so ugly and we had to break up but Python is "cleaner"[1] and I just couldn't stick with you.
[1] Personal preference I am not looking for a fight :)
- irahul 15y ago> Pity you were so ugly > [1] Personal preference I am not looking for a fight :) Your wordings don't align with the disclaimer. That's like saying "you are an idiot, but hey, it's a personal perspective - I am not looking for a fight". FWIW, I have used perl heavily, and now a days mostly do Python and Ruby. My reasons for Python/Ruby are basically Nltk/Flask/Gevent, Rails etc and don't have much to do with the languages themselves. They are pretty interchangeable with some syntax difference.
- hartror 15y agoMy words do. Beauty is in the eye of the beholder, I prefer many things about Python over Perl not just the syntax. I wasn't claiming that I think others are stupid for liking or using it, just my personal preference of what I like in a language. Perhaps I could have worded it a little less flame bait like: Pity I didn't like your idioms and we had to break up as my eyes and heart prefer Python. Any better?
- kamaal 15y agoOn the other hand I see a massive drop in Python's popularity these days. Earlier it used to get all the talk. Coffee tables, forum discussions, debates what not. Also few days back, I used to run into people choosing Python as a language for their project all the time. That seems to falling rapidly now. The popularity and fan boy crowd seems to have moved to server side JS these days. We are only days away from how people bash Python for more recent fancier options.
- berntb 15y ago>>I prefer many things about Python over Perl I have been doing Python a bit now and am of the opposite opinion. Except for CPAN I miss the advanced stuff like Moose (better OO) and extensible syntax. I might be too new to the language. E.g., I don't really get the list comprehension -- it looks like a kludge around the lack of multi line code blocks, so Python can't have nice a map() syntax. But people seems to love the that syntax, so there should be more to it than a kludge? But sure, Python has a minimal and elegant notation; it just changes a bit too slowly. Also, try posting a flame comment like yours about Python in a Python thread; you'd be at minus ten in five minutes and stupid comebacks would be up voted to orbit. The fanaticism makes RoR kids look mature.
- hartror 15y agoList comprehension is one of those things I miss every I use another language. I am not sure what you mean with: it looks like a kludge around the lack of multi line code blocks could you provide and example?
- berntb 15y agoDon't you know what map is? But you claimed to be an old Perl programmer? I wrote "Python can't have nice a map() syntax", because of its lack of code blocks. And that list comprehensions seems like a one-statement kludge of the map functionality. How could I have been clearer? OK... second attempt to explain this point: :-) List comprehension seems to me like a one statement replacement of a map function (and that one-statement often makes you think of Perl golf.) And a third attempt: :-) It seems to me that list comprehension would never have been implemented -- if Python had added (optional) support for ';' (+ '{'/'}') and hence code blocks. That is because Python would then use map() instead of list comprehensions (like all other scripting languages, lisps, etc). (Also, a side effect of optional ';' support would mean that Python wouldn't be worthless garbage as a bash cmd line tool.) But please enlighten me about use cases not done clearer/better with code blocks? I note that you don't argue about the fan bois point... :-)
- SimHacker 15y agoBut Perl IS ugly. You haven't noticed that before? The truth hurts.
- pavelkaroukin 15y agoIf you still consider Perl, I recommend checking out: Plack, AnyEvent::*, Catalyst/Dancer (depending on required complexity) for web stuff. Perl libraries made a huge leap forward. And for me it was unnoticed.
- gatlin 15y agoIf I'm not mistaken, libev and AnyEvent are designed by the same guy (and I think AnyEvent was what libev was created for). Also, check out Coro (coroutines), Tatsumaki and plackperl.org for other awesome libraries and tools that rival and even surpass their counterparts in other languages.
- peteretep 15y agoPeople complaining about Perl being ugly is a bit like people complaining that clay is ugly. Yes, you can build tremendously ugly Perl, but you can also build code of breath-taking beauty, combining the best parts of functional programming and OO...
- danssig 15y agoSo, it's a general purpose programming language like a lot of other languages are too? The complaint is obviously that Perl is uglier than it needs to be. You can see this when you compare it to other languages that are just as (if not more) powerful but not as ugly.
- mmccaff 15y ago"There's more than one way to do it" (TMTOWTDI or TIMTOWTDI) is a Perl motto. Perl was written with that idea in mind. This can allow developers to write "ugly" Perl -- or quite the opposite, as @peteretep said.
- danssig 15y agoShow me a modern, general purpose language for which there isn't more than one way to do most things and I'll show you a language you don't know very well. Even Python, who's motto would be closer to "one right way to do it" always has more than one way. So you're statement doesn't explain anything I'm afraid.
- gatlin 15y agoI don't think the things you two are saying are mutually exclusive. Perl is ugly in inexperienced or rushed hands, and other languages do have flexibility and general purpose. I will say that I have found my muse in Perl, and that it allows me to express ideas succinctly and beautifully but that's not to the detriment of Python (with which I made a livelihood for a few years). If you want beautiful Perl, pick up Kaufmann's "Higher-Order Perl." It has a number of functional design patterns and ideas which are useful and elegant. The author claims that where most people write C in Perl, his book is an attempt to convince you to write Lisp in Perl.