|Syntactic Confectionery Delight|
Re: What is the impact of 5.18.0?by kcott (Chancellor)
|on May 26, 2013 at 04:17 UTC||Need Help??|
A further annoyance with the experimental features is that "use 5.018;" only enables some of them (e.g. 'smartmatch' is enabled while 'lexical_subs' is not). In addition, it would be useful if the error or warning messages actually stated what the related feature was (or vice versa).
Here's some examples.
This produces warnings about given and when (you need to know that the feature is smartmatch) and an error about "my" subs (you need to know that the feature is lexical_subs):
Also potentially confusing, is that the warnings are not emitted if the error is emitted first:
Enabling lexical_subs in the first example, the code runs but with lots of warnings. Note the warnings inconsistency of given/when mentioning the code but not the feature and lexical_subs mentioning the feature but not the code (which, in itself, is inconsistent with the lexical_subs error mentioning the code but not the feature):
Adding 2 more lines of code to get rid of the warnings:
[In the above examples, replacing -e with -E and removing use 5.018; produces the same result.]
While something of a contrived point, I do note that the additional code I had to add in order to remove all of the warnings is of an equivalent size to the warnings themselves.