Live data from Hacker News

Not Your Grandfather’s Perl

stackoverflow.blog

91–100 of 257 posts

Re: Not Your Grandfather’s Perl

#91

Earlier quoted context omitted.

> What I do appreciate that's missing from many other languages and systems is the extreme committment to backwards compatibility. The knowledge that the next minor release won't break existing scripts is underrated, IMO. I don't write much Perl these days and haven't for some time, but it's still what I might reach for if I were tasked with writing something suitable for a scripting language that had to run with ~0…

Perl needs backwards compatibility given the `write once, read never` nature of the syntax. Imagine trying to upgrade this to some new syntax... https://github.com/schwern/AAAAAAA

The fact that it's possible to craft deliberately obfuscated code in a language doesn't actually tell you much about the language.

Re: Not Your Grandfather’s Perl

#93
post #69

Earlier quoted context omitted.

> Perl receives such an unnecessary amount of hate I agree. We might deny it, because we are geeks, not fashionistas, but there's such a thing as "cool for geeks" like running Rust code on MacOS with some PostgreSQL sprinkled on, and such a thing as "uncool" like running Perl code over Windows and exchanging CSV files. Personally, IDGAF: I care about what works the best, not what's cool. I care about performance. I c…

This^ If your system isn't performant, it's shit. Performant is relative to what you're trying to do and how picky your users are, but at some point you're going to be optimizing for milliseconds without question.

[deleted]

Re: Not Your Grandfather’s Perl

#94
post #35

Earlier quoted context omitted.

I’ve had very limited contact with Perl, but for scripting purposes it does seem like the best option, so I intend to sit down to it and learn it better. It looks like a great next step after sed and awk (perl -pe). I love the ability to write terse scripts, reasonable speed for a scripting language and, as you said, backwards-compatibility (such a stark contrast compared to Python).

I would argue that ruby as almost all the strengths of perl and conciseness with more coherency if you want a perl-like fluidity and terseness. I personally like python for anything that becomes more than a 100 lines of bash.

Due to poor coding practices (eg monkeypatching) and a weaker testing culture (by default Ruby does not run unit tests when installing libraries) I've found Ruby to be substantially less reliable than Perl.

However the world has moved on to Python. So I curse every time I again have to look up how subprocess works for what I'd do in Perl with backticks.

Re: Not Your Grandfather’s Perl

#95
post #74

Earlier quoted context omitted.

Maybe the thinking was that Perl's STDIN, STDOUT, STDERR, came from c's (well, stdio.h's) stdin, stdout, stderr? Which then inspired the bad idea of expanding on that?

It's more from sed/awk/shell I suppose. eg, open FH, " vs FILE *fh = fopen("filename","r")

For the and variations, sure. Though IO::File has been there a long time and looks a lot more like your C example. IO::Handle also.

Supports, for example:

$fh = IO::File->new("filename", "r");

Or, as with C, things like O_WRONLY|O_APPEND in place of "r".

Re: Not Your Grandfather’s Perl

#96

I don’t really miss perl. I do miss the period when perlmonks was relevant to me. I haven’t really seen a similar community since. Maybe rose tinted spectacles on my part but i learned some really enlightening algorithms on there specifically in text processing and i recall it being a really warm community. Randall Schwarz used to run a podcast that was a total goldmine. Fond memories of listening to that on the trai…

Most of the people who were on perlmonks are still around somewhere. Often with the same or a similar handle. (I added my first initial to mine.)

Re: Not Your Grandfather’s Perl

#97

With function signatures and state variables added in 5.010, I consider Perl feature-complete and have not really missed anything from it for as long as I've been writing Perl. What I do appreciate that's missing from many other languages and systems is the extreme committment to backwards compatibility. The knowledge that the next minor release won't break existing scripts is underrated, IMO. Solo project with ~23K…

Needs static typing. I'll let myself out now.

When was the last time this caused a bug for you? My experience of moving from JavaScript to typescript is that it takes significantly longer to write many generic things because the types can’t really express the intended use as well. I will certainly admit that types help a lot at the boundaries between systems , or for catching errors introduced when changing code, but it’s not always a clear win for types, given how much more verbose, and less expressive the language becomes as a result.

Re: Not Your Grandfather’s Perl

#98

With function signatures and state variables added in 5.010, I consider Perl feature-complete and have not really missed anything from it for as long as I've been writing Perl. What I do appreciate that's missing from many other languages and systems is the extreme committment to backwards compatibility. The knowledge that the next minor release won't break existing scripts is underrated, IMO. Solo project with ~23K…

Signatures were added in 5.020, and [edited:] were considered experimental until 5.036.

are Perl function signatures the PHP/Python equivalent of type hints?

Re: Not Your Grandfather’s Perl

#99

With function signatures and state variables added in 5.010, I consider Perl feature-complete and have not really missed anything from it for as long as I've been writing Perl. What I do appreciate that's missing from many other languages and systems is the extreme committment to backwards compatibility. The knowledge that the next minor release won't break existing scripts is underrated, IMO. Solo project with ~23K…

>Bless you, Larry

I see what you did there.

Edit: for those downvoting me because they don't understand my comment, it refers to the fact that bless is function of the standard library to associate an object with a class.

If you're downvoting me because you think it's a stupid and off topic comment, that is perfectly valid and acceptable to me.

Re: Not Your Grandfather’s Perl

#100
post #64

I spent the last 16 years of my career using Perl for about half of what I wrote. And I read the article. The title makes no sense. The article show anything meaningful as to why Perl has improved and is "not your Grandfather's Perl". Most of what the article talks about has been around for over a decade. If anything, it shows that Perl really still has under it the same old decrepit beast it always been hiding away.

[deleted]
Post reply on HN