Live data from Hacker News

What is Modern Perl

josetteorama.com

11–20 of 46 posts

Re: What is Modern Perl

#11

What is modern Perl? Python. (I'll elaborate more here from my earlier one-word answer). Long-time perl programmer here, until I found Python. Perl is powerful, but Perl is for the programmer, not the programmer's coworkers. It's not even for the programmer 6 months down the line. This is nothing new, and it has become a stereotype in the community. Yes, this argument has been made and refuted many times, but I argue…

I rarely resort to magic code in Perl. I sometimes do because I can't find a better way to do it, and then I comment it as such. Comments are wonderful things when used properly.... If only more programmers in any language used them properly...

I have seen so much really wonderful, readible, maintainable Perl code, that I don't think your characterization works.

You know if I come back a couple months later and don't like my code, I rewrite it based on my objections. It doesn't happen often but it does sometimes. It happens in any language.

If you value maintainability, you will eventually write maintainable code. The only flaw Perl has is in promoting valuing getting things done more than maintainability, but that's a culture of programmers, not the language. You can get good groups together than can write beautiful, maintainable code. I have done it. I know.

Re: What is Modern Perl

#12
Writing a book on Modern Perl is nuts.

As the author of this post points out, there have been about twenty releases since Perl 5.6, when the book was published. Features like the "switch" and "state" keywords have been introduced. If you look away too quickly, another database interface crops up, or people are doing objects differently. Perl changes so often that writing about it is like trapping a unicorn.

It's impressive that users of a 25-year-old language are not afraid to improve upon it (with the caveat that it stays backwards compatible). But since I started using $OTHER_LANGUAGE I don't have to worry about keeping up to date because language features change twice a decade.

Re: What is Modern Perl

#13

What is modern Perl? Python. (I'll elaborate more here from my earlier one-word answer). Long-time perl programmer here, until I found Python. Perl is powerful, but Perl is for the programmer, not the programmer's coworkers. It's not even for the programmer 6 months down the line. This is nothing new, and it has become a stereotype in the community. Yes, this argument has been made and refuted many times, but I argue…

Perl is for having work done in a minimal time. If you want to write code that is easy to read, learn Ada. Python is probably a better balance. Perl is wonderful for all the small scripts I need every days. When something needs to be reused, it become a module with a good documentation. I think nobody should read perl code except: - to learn how to code. - to modify a program you have written

Re: What is Modern Perl

#14

What is modern Perl? Python. (I'll elaborate more here from my earlier one-word answer). Long-time perl programmer here, until I found Python. Perl is powerful, but Perl is for the programmer, not the programmer's coworkers. It's not even for the programmer 6 months down the line. This is nothing new, and it has become a stereotype in the community. Yes, this argument has been made and refuted many times, but I argue…

Perl is for having work done in a minimal time. If you want to write code that is easy to read, learn Ada. Python is probably a better balance. Perl is wonderful for all the small scripts I need every days. When something needs to be reused, it become a module with a good documentation. I think nobody should read perl code except: - to learn how to code. - to modify a program you have written

Re: What is Modern Perl

#15

Writing a book on Modern Perl is nuts. As the author of this post points out, there have been about twenty releases since Perl 5.6, when the book was published. Features like the "switch" and "state" keywords have been introduced. If you look away too quickly, another database interface crops up, or people are doing objects differently. Perl changes so often that writing about it is like trapping a unicorn. It's impr…

That's a terrible straw man. Everything changes. Javascript is morphing into this weird "Coffee" thing before our eyes. Python pushed a completely new language and is currently supporting two of them. Even python 2.6 looks absolutely nothing like 2.0. People fled whole-hog from perl and python to ruby (another hardly static language) a few years ago, and most of those same people are now retraining their brains on that JavaCoffee thing I mentioned.

C++? Yeah, brand new version out with whole new metaphors (An... rvalue reference?! And what is that -> operator doing there?).

If you want compatibility, you have it. 15 year old perl scripts run fine on 5.14. If you want the community to not invent new stuff... dig yourself a hole I guess.

Re: What is Modern Perl

#17

What is modern Perl? Python. (I'll elaborate more here from my earlier one-word answer). Long-time perl programmer here, until I found Python. Perl is powerful, but Perl is for the programmer, not the programmer's coworkers. It's not even for the programmer 6 months down the line. This is nothing new, and it has become a stereotype in the community. Yes, this argument has been made and refuted many times, but I argue…

So you say that Python is Perl? It cannot be modern Perl without being Perl.

I think that both Perl and Python programmers disagree with your statement.

Re: What is Modern Perl

#18

What is modern Perl? Python. (I'll elaborate more here from my earlier one-word answer). Long-time perl programmer here, until I found Python. Perl is powerful, but Perl is for the programmer, not the programmer's coworkers. It's not even for the programmer 6 months down the line. This is nothing new, and it has become a stereotype in the community. Yes, this argument has been made and refuted many times, but I argue…

Obvious trolling from a karma 20 account.

I'll enjoy Python when pypi doesn't frustrate me many times more than CPAN, there is some Python equivalent of Moose (Python 3.5, 4?) and the grammar is extensible like Perl 5 (using CPAN modules).

Re: What is Modern Perl

#19

What is modern Perl? Python. (I'll elaborate more here from my earlier one-word answer). Long-time perl programmer here, until I found Python. Perl is powerful, but Perl is for the programmer, not the programmer's coworkers. It's not even for the programmer 6 months down the line. This is nothing new, and it has become a stereotype in the community. Yes, this argument has been made and refuted many times, but I argue…

[deleted]

Re: What is Modern Perl

#20
I'm torn between thinking there is value in learning some Perl and not really knowing that value might be.

I've found a lot of embedded wisdom in the "old school" stack. If you edit in vi, add some sed / awk / grep, and learn some bash, you'll find these tools start to come together and leverage one another up substantially. Perl might be more post-Bell Labs but it still was written and used by smart people to Get Stuff Done. It stands to reason that there are large returns on learning it.

But it isn't as approachable as Python. When I needed a glue language, I first looked at "Learning Perl" -- after a few days I concluded that, if this was The Path, then I would never get There. Python was much more approachable, and my code already gathers so many hacks that I'm glad my language forces me to make these at least somewhat intelligible.

I would learn Perl faster now. But for what? I've learned some PHP to meet client demand, and for web development the next language would be RoR. I bet Perl is better than bash for various sysadmin and utility tasks, but bash feels good enough for the simple stuff I do. If I needed to do something really beyond bash I'd turn to Python, and I'm not sure why Perl would be better. I suspect there's a lot of general knowledge embedded in Perl but I'm not sure how that gets extracted and made current among today's toolset for the tasks I have.

So to my mind, Perl is something of a sysadmin tool, better than bash and very useful for a workload focussed on system and file processing, on *nix, without much service to HTTP. I'd love to hear how it pays returns for people more focussed on back-end support of web development.

Post reply on HN