tm604OP•

It's halfway down the post (and past the "beware of the leopard" sign), but I think the two relevant points here are:

the way forward for Perl providing a better baseline is via the use v mechanism.

and

In other words, using use v7.0 will be the way to move forward.

6
lindleyw•

The best part of use vX is that thirty days, or thirty years, in the future, it gives the reader a hint of the author's intentions. Imagine how easier today's discussions would be, had use vX been a best-practice a decade or two ago.

8
EvanCarroll•

Just imagine if it was in place a couple of decades ago!

Perl would default to having pseudo hashes, we could change the starting point on arrays, it'd be another 2 megs in size, and the default behavior of hashes would be ordered!

Glorious times.

1
lindleyw•

Isn't it more like: If you pick up some Perl code without "use v5.010" or greater, you have no assurances it does not depend on pseudohashes or other old behaviour? You would be relying on metadata (perhaps as good as a comment in the file, perhaps as easily-mislaid as the date of a git commit) to know on which version of Perl it was last known to properly execute.

1
EvanCarroll•

It's not the versioning of the code against the interpreter that's the problem.

It's the assumption that the versioning is enough to stop breaking changes between different versions of Perl. Or that somehow magically old code will run on new versions of Perl without modification that's the problem. Take for example signatures. That should be moved from experimental. It should be in use v5.32 or whatever, as part of a newer spec in Perl. That much seems acceptable to most, but when do we drop support for running perl without signatures and clean up core? This isn't something, afaik, that's happened once. Features go in. They stay features forever.

The assumption seems to be strong that with each new feature perl will just have a new running mode: one with the feature, one without. That's mathematically unmaintainable and until we address that the whole feature thing seems more like a non-starter to dodge the conversation. Also worth pointing out this isn't used in Python (you don't need to declare a "feature" to use async def). The same is true node and php.

The only real way this system works is in Rust and C where you declare the specification and the language itself is compiled (so it's not carrying around the baggage of different specs in runtime).

3
solpaadjustmadisar•

Imho the v7 is probably a bad idea, why would I want to use a module that was last updated 5 years ago, it would be a dead end without any bug fixes or even replies. (Unless it's something trivial)

People would maybe try to move to v7 due to the hype but then they will stagnate till v10? Using vx is not a magic bullet if the authors don't at least try to keep up with newer versions.

I have had to deal with some modules with v5.00x and it's horrible. I can't even search online on how to do xyz on that specific version of perl. Do I have to remember how to do xyz in 5 different versions of perl?

I am not sure if it makes sense to tell, if you are using a version more than 15y old, you are on your own.

I am no expert anywhere, but the perl c code is still c89, the build system is horrible, and probably supporting all the versions will add to a lot of code and testing complexity there, maybe even slowing some thing down.

-1
Grinnz•

"Supporting all the versions" in Perl's case is trivial and unchanged by this plan. Perl supports what it supports, features are removed by a deprecation process when necessary, "use" declarations just enable a different set of features. "use 5.005" does not necessarily mean anything more than the code is very old, 95% of the code will work exactly the same on the newest Perl.

In fact this mechanism allows us to avoid the case where one has to remember 5 different versions of Perl, because you only have to remember the features enabled by the declaration you've made in your code. This is intentional.

3
solpaadjustmadisar•

I might have been just unlucky perhaps, even hashes behaved differently. This became worse because some modules had the 5.00x and some didn't have vx

And it isn't always my code. The person who wrote it is probably retired by now.

1
tm604OP•

why would I want to use a module that was last updated 5 years ago

Perhaps because 75% of CPAN falls into that category?

Only 73995/271864 have been updated in the last 5 years, if I have this MetaCPAN query right:

curl -XPOST https://fastapi.metacpan.org/v1/release/_search -d '{
 "query": {
  "range" : {
   "date" : {
    "gte" : "2016-04-11T00:00:00"
   }
  }
 },
 "filter": {
  "and": [
   { "term": {"maturity": "released"} },
   { "term": {"status": "latest"} }
  ]
 },
 "aggs": {
  "dists" : { "value_count" : { "field" : "distribution" } }
 },
 "size": 0
}'
3
solpaadjustmadisar•

This is one way of looking at it :) . But probably a lot of people have moved on to different places, and I am assuming this is one reason.

1
ether_reddit•

I'd post another meme pic, but the last time I did that I got accused of racism, so... shrug

This is great news and now we can get on with discussing what fabulous things v7 will include.

5
ganjaptics•

How was this not the completely obvious thing to do? What were the alternatives?

5
Kernigh•

For the alternative, some future version of Perl would use v7; by default. See the previous Reddit post. The changed default would perhaps be good for new code, but bad for old code.

The new plan is keep the old default. The new plan isn't completely obvious, because the PSC says that not enough people know to use v.

1
ganjaptics•

The new plan is keep the old default. The new plan isn't completely obvious, because the PSC says that not enough people know to use v.

Uhh, are we assuming perl programmers are stupid or something? If they can't be bothered to figured out the purpose of the 'use v7' line from that SO snippet they're copy-pasting, they have much bigger problems. And presumably every article and documentation page requiring v7 will have "this required 'use v7';" at the top.

Hell, Python programmers can juggle 2 major versions and multiple minor versions (not that it's a good thing they need to do that). Java and .NET programmers always know what version they're on because their IDEs will tell them.

5