On Mon, Sep 03, 2018 at 11:45:58AM -0500, Stephen Wilcoxon wrote: : Why the change in die handling between Perl 5 and 6? Suppressing line : numbers with newline was very handy. Alternatively, adding some sort of : directive would be more straight-forward (at least for Perl 5 users moving : to Perl 6).
Well, we did take Perl 5 users into account quite a lot, since many of us came from that direction, and we hope more will come in the future. On the other hand, language design is all tradeoffs, and every time you add a low-powered feature (or keep one, in this case), you raise the barrier to entry for folks coming from other cultures, and you waste mindspace remembering things that don't buy you much. For similar reasons, <> changed to lines() and all the magic rules about which variables are local to a loop went away. Likewise, a lot of the arcane knowledge of how a given function behaves in scalar or list context went away, mostly by splitting them into distinct operators that are easier to read and document. Of course, the tradeoff is that that are then more operators. So, sure, you could argue that we've just substituted one kind of arcane knowledge for another, but at least you can justify something like exit note “Phooey”; by mere function composition without appealing to the authority of a particular paragraph in the manual. And of course you could also compose your own function if the situation ever rises more than once in your program. my &eep = &exit ∘ ¬e; eep “Phooey”; In the specific case of this feature, one could also argue that putting that much semantic weight on the final character of the string is violating some kind of end-weight or one-pass principle, forcing a kind of mental time-travel for the reader, if not for the compiler. Anyway, don't be a language designer if you want to make everyone happy all the time. :-) Well, actually, you can want it, just don't expect it... :-) Larry