> there’s still much to be done to make Unicode the default
Why's that? If that's something someone with zero Perl experience can easily understand. Isn't this only about the source code? Or does this mean all strings are unicode?
171–180 of 573 posts
> there’s still much to be done to make Unicode the default
Why's that? If that's something someone with zero Perl experience can easily understand. Isn't this only about the source code? Or does this mean all strings are unicode?
Earlier quoted context omitted.
use strict. In Perl you can prevent something like the following from compiling. You can't with Ruby (unless they've finally addressed that). $foo = 2; if (some_test()) { $fooo = 3; }
Shouldn't that be: my $foo = 2; ?
Earlier quoted context omitted.
Perl definitely has a lot of non-patterned arcana. For instance, $| This variable, if nonzero, will flush the output buffer after every write() or print() function. Normally, it is set to 0. In other languages, you do something like os.stdout.buffered(true) or sys.stdout = io::buffer(sys.stdout) or something like that where you're combining composable pieces: the standard std variable, a standard way of opening files…
Sure, it's got lots of historical baggage, but there are more sensible alternatives to $| - like STDOUT->autoflush(1) - it's not like you have to use the obscure versions of every feature.
If hard-to-read-and-remember syntax exists, people WILL use it. And some people will make a POINT to use it, because it makes them feel cool.
Having two totally but pointlessly different syntaxes for the same thing doesn't absolve you from having to learn both syntaxes, because you'll still encounter other people's code that uses both of them -- it just gives you twice as much syntax to learn.
If there's a "sensible alternative", then why does there have to be a "senseless alternative" in the first place?
They last line of the article summarizes it well: > Perl 7 is v5.32 with different settings. Your code should work if it’s not a mess. Expect a user release within a year. Are there actually people that are still deploying new things in Perl? The only times I see it is for legacy stuff, and then only because the script is too much of a hassle to be rewritten.
I have used Perl since the Perl 4 days. One can write bad Perl, and I've written a lot. One can write good Perl, and I've written some. It has saved me and others quite a lot of time on assorted projects. These days I tend to use Python where once I'd have used Perl. This is mostly because I find that the young are far more likely to know Python than to know Perl. I will be retiring one of these days, after all.
And that was at a time where you still (occasionally) had to write your own string replacement function that a weirdo company-specific BASIC dialect didn't have.
There's never been a language that I thought of as "Python, but with a cleaner structure", even though Go may be something like "Java 1.2 but with a cleaner structure and a fast toolchain"
I was part of a team that wrote significant parts of Amazon's payment processing systems in Perl in the late 90s. I really loved the language. It's object system was so flexible and powerful. Once you understood how write idiomatic perl. It was a joy to use. I'm looking forward to trying out Perl 7.
Earlier quoted context omitted.
Perl was a great fun scripting language back in the day of CGI and "webmaster@". It died a noble, honorable death. RIP.
It's not even close to dead.
How much production software is started from scratch every day using the language?
I started my career in Perl and I still have fond memories of working with it up to late 2000's, but by that time the writing was solidly on the wall.
Dead in this context means "niche".
Earlier quoted context omitted.
Yeah that too! People keep saying perl is a bad language or something and the other languages can't even get implementing closures right. I've always liked the references syntax, probably the most complained about feature. Its just pointer thinking. You could probably collapse `$array[$x]->{"foo"}->[0]` to `$array[$x]{"foo"}[0]` and save some keystrokes.
> probably collapse $array[$x]->{foo}->[0] to $array[$x]{foo}[0] ... Yup, one's been able to collapse exactly like that for more than twenty years. https://metacpan.org/source/LWALL/perl5.002b3/pod/perlref.po... That's from 5.002, from last century, and it wasn't introduced on 5.002. Beginning from v5.20, one's also been able to use the postfix dereference syntax, turning: say join "\t", @{ $foo->{bar}[0]{quux} } int…
tl;dr - Perl 7.0 is going to be v5.32 but with different, saner, more modern defaults. Perl was great 20 years ago for basic scripts. Where is it still used today who hasn't transitioned to Python/etc?
Perl continues to be great for basic scripts. Why change and throw away 20 years of experience? The only thing I've noticed that's lacking is decent protobuf support.
Earlier quoted context omitted.
Sure, it's got lots of historical baggage, but there are more sensible alternatives to $| - like STDOUT->autoflush(1) - it's not like you have to use the obscure versions of every feature.
That certainly doesn't solve the problem of other people showboating their knowledge of obscure Perl sigils by using those ridiculous line-noise abbreviations in code you're trying to use and understand, so you have to look up each bit of obscure punctuation in its particular context in order to understand the code. If hard-to-read-and-remember syntax exists, people WILL use it. And some people will make a POINT to u…
No-one ever deliberately invents 'senseless' things, we just discover better ways over time. Sure, if we could somehow magically always invent the best way first of all, that would be great. But we can't, so we make the best of what we have, and improve when we can. But there's no need to punish the existing users of older, 'worse' things.