Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> People still trying to revive Perl against modern fad, for example, Python.

Lmao Python has been around since 1991 only three years after Perl appeared. How's it a fad? Sucess of python is a testament to the difference a simple and beginner-friendly syntax can make as well as the "batteries-included" paradigm. Most people don't realize how much of a difference these things make especially in removing the initial barrier to get started with programming. There's a reason Go language creators enforced a rigid formatting requirement. It not only improves readability but helps in creating clever tools for syntax checking and other tasks. Readability is key, the fact that Perl code is compatible with that 20 years before makes no difference as they have such bad readability (especially quickly made scripts for sysadmin tasks which no newbie can understand and maintain now). So even for now Python is the best choice for shell scripting, eventually until Go takes over. At this point unfortunately I don't see any area where Perl can make a difference compared to other languages.



> Lmao Python has been around since 1991 only three years after Perl appeared. How's it a fad?

If everyone start wearing pink this year, that's a fad. A fad has nothing to do with when the stuff was invented. It only has to do with people choosing it from the dominant reason being other people chooses it.

> Sucess of python is a testament to the difference a simple and beginner-friendly syntax can make as well as the "batteries-included" paradigm.

So why Python didn't succeed when Perl dominated? As you said, Python was around for quite a while then. "Simple", "beginner-friendly", "batteries-included" are all subjective terms that none of them I think is true compared to Perl. That mostly comes from one's background and culture, not worth to debate.

> the fact that Perl code is compatible with that 20 years before makes no difference as they have such bad readability

Writing Perl the way one writes shell scripts is what gets Perl's write-only rep. Do not write scripts the way we write shell scripts. Write scripts the way we write code -- That is my motivation to replace shell scripts with Perl.

There is no easy way to write readable shell scripts. Perl has all the language features that enables writing readable code. Using bad practitioner as argument for bad language is a bad logic. But if all you saw were bad practitioners (or more likely today, one haven't seen real practitioners by hears about the bad rep and see some bad relics), then it's hard to convince you. Perl has formatter. Perl has strict mode (that should be default). Perl has best practices. The people still using Perl today knows this. People who claim Perl is unreadable are getting that from the 90s.


> A fad has nothing to do with when the stuff was invented. It only has to do with people choosing it from the dominant reason being other people chooses it.

If that's your interpretation of a fad then you're still wrong. The dominant reason why people choose Python is the strong ecosystems that have been built around it - everything from scientific computing, data analysis, machine learning, web frameworks and so on. This happened over decades. And it's no coincidence why so many good libraries have been written in Python. All of their creators have publicly admitted they loved Python syntax, wanted to code in Python and nothing else in their jobs even if it means having to write a whole different library. And because Python has so low threshold for beginners, these caught on fairly quickly and took over. Python core developers listend to the community and quickly adapted to their needs. Meanwhile Perl gods buried their heads in their pursuit of the most perfect programming language ever - and we all know how that turned out.

> So why Python didn't succeed when Perl dominated?

Who said it didn't succeed? It's growth was just slower than Perl. It was slowly building up steam. While Perl exploded and ran out of fuel in 10 years.

> Do not write scripts the way we write shell scripts.

This has nothing to do with writing new scripts. Read my comment again. This is about maintaining/adapting legacy code from 10-20 years back. In 90% of the cases for Perl that means a complete rewrite because there's no point spending time understanding the gibberish. I can't really go back in time and tell those people to write good code or be "good practitioners". And if I have to do a rewrite now, there's absolutely no reason to choose Perl, that ship sailed in early 2000s.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: