3 ms·
v8 will actually change defaults Bad idea, imo. Keep the perl binary backwards-compatible (unless 'use v8' is specified), and add a separate perl8 alias that d
by cygx 6y ago
v8 will actually change defaults
Bad idea, imo. Keep the perl binary backwards-compatible (unless 'use v8' is specified), and add a separate perl8 alias that does so implicitly.
- yellowapple 6y agoIt'd be interesting to see versions specified by their file extension. Perl 6 already set that precedent with the .pl6/.pm6 extensions, and I don't see any substantial downsides aside from maybe some file association inconvenience (but that's pretty trivial to fix). Plain .pl/.pm files can then always be assumed to be Perl 5 code, and to be treated as such.
- cygx 6y agoDidn't think of that, but it could work. If you only provided the perl8 alias, you'd still need to add a use declaration to modules, whereas that could be absorbed into the file extension...
- toast0 6y agoThere's no need to set it with a file extension. You can set the #! or put use v8.
- yellowapple 6y agoRight, but that's extra boilerplate. Granted, it's only one line (two if you do both), but still. Reducing boilerplate is already an explicit goal for v8, so it seems like it's worthwhile to be consistent on that front. Also, not all Perl files have a shebang, and not all files are invoked in a way that'd make a shebang useful. Modules are the obvious example here. In any case, nothing precluding all three approaches from being supported in case Perl hackers really prefer a "use v8;" over changing the filename or vice versa.
- zokier 6y agoIf the defaults are not changed, then what would be the difference between v7 and v8?
- cygx 6y agoIf backwards compatibility was kept, there would be nothing special about v8 - it would just be the next major relase after v7.
- sigzero 6y agoNo, Perl needs to move forward. v8 would be a sane timeline since that is a year or two away anyway.