Most code I look at these days is a mess, regardless of language. It can be depressing. I've decided to retire and forge artisan hammers (for which I can charge crazy prices, like some hipster barista), since people seem to love hitting themselves in the face while refusing to learn how to stop hitting themselves in the face, mostly due to laziness or habit. N.B. some actively enjoy moaning, so it's just a substitute for recreational drugs. Be warned, many of these hammer lovers will try and drag you down with them. Lest we forget, please Hammer Don't Hurt 'Em.
| [reply] |
| [reply] |
As far as I understood is the idea that you will still be capable to switch off the new default pragmas.
like no warnings
Tho I don't know if this will work with :prototype() too.
edit
I really hope they won't introduce the experimental function signatures, since they lack named arguments.
| [reply] [d/l] [select] |
I really hope they won't introduce the experimental function signatures, since they lack named arguments.
That's strange. Why would you block a thing which is considered useful by quite a few Perlers only because some feature isn't available right now? Wouldn't it be better to suggest a parseable syntax how to write named arguments?
| [reply] |
As soon as it is official, it'll be very hard to introduce named arguments.
I don't care a lot about most of the fancy stuff Dave wants to implement, but "named args" are crucial.
IMHO 10% of the extra effort but 90% of the benefit.
| [reply] |
LanX Heute um 16:58 Uhr
so let me summerize what I understood about planed backwards- compatibility for CPAN and Perl7
* if a module has "use 5.X" old features like sub (PROTOTYPE) { BLOCK } will stay enabled
* if a CPAN -Modules has no "use 5.X" then it will be assumed by the CPAN-Installer to be 5ish, a Flag will be set and the old features stay enabled
* it has to "use 7.X" to indicate that new features are enabled
not sure how the second point can be achieved without statically parsing the code, since use Statements are executed at compiletime
Did I get it right?
=== Update
One example of code without explicit Perl-Version is List::Util , (which is also CORE but nevertheless also on CPAN) (bearbeitet)
16 Antworten
LanX vor 2 Stunden
Please reply in thread ... (bearbeitet)
autarch vor 2 Stunden
No, absent any indication perl 7 will run code in "7 mode" (for lack of a better term), which includes strict & warnings by default
autarch vor 2 Stunden
and other features
LanX vor 2 Stunden
yeah but how do you plan to maintain code on CPAN which is supposed to run on both major versions?
5 has no "use oldPrototypes"
e.g, take a look at List::Util (bearbeitet)
autarch vor 2 Stunden
no idea, honestly
autarch vor 2 Stunden
I'm just answering based on what I got from the presentation
LanX vor 2 Stunden
I think hat's a crucial question and I just asked in the BOF, and that's how I understood Todd.
But i prefer to ask again in a written form ...
regarding CORE modules, I think I saw Paul Evans yesterday mentioning that he doesn't know if he wants to maintain 2 versions of List::Util
Dakkar vor 2 Stunden
a thing that Todd said: use compat::perl5 can be trivially written to work in perl5 (he has written it already); so, if a cpan maintainer has a module that won't "just work" in 7, they can add use compat::perl5; to it, add that module to the dependencies, and be done
:+1:
1
Dakkar vor 2 Stunden
https://gist.github.com/toddr/0c280d3a4f5951776cd0d1e6d49dba11
LanX vor 2 Stunden
true ... but he also said that the installer would introduce it automatically for other modules (like unmaintained ones) ... right?
Dakkar vor 2 Stunden
yes, which wouldn't even be that hard (add that line after every package declaration, or at the top of the file, if the META.yaml doesn't say the distribution requires perl => '>= 7.0'
:+1:
1
Dakkar vor 2 Stunden
(disclaimer: I'm not a core dev, and I'm handwaving a lot)
LanX vor 2 Stunden
OK ... that sounds reasonable
Dakkar vor 2 Stunden
I'm sure there's tons of weird cases where it won't Just Work™, but this covers a lot of ground
LanX vor 2 Stunden
Yeah ... sorry for insisting ... but before talking about more feature requests we have to get this right
:+1:
1
| [reply] [d/l] |