In the case of Switch.pm, anything other than parsing code exactly the way perl does is unaccaptable, because anything less will cause bugs, often in areas which are unrelated to the use of a switch.That's like saying you can't make typos when editing, because they cause bugs. And you are implying those bugs can't be found before they product is released. If Switch.pm parses something incorrectly, it's very likely to produce uncompilable code. Perhaps you deliver code without even attempting to compile, I sure don't. In the few cases it doesn't produce uncompilable code, it'll produce code that is wrong - and your test suite is going to catch it. (If it doesn't produce code that's wrong, the code is correct, so it's not a problem). If you don't want to trust your test suite, you can always visually inspect the results of the source filter, to check whether it substituted only the code you wanted to be substituted, and all of it.
The essence is that you write a particular program, and apply a filter to it. And that program isn't going to change from run to run. It's fixed. It's not input. Switch.pm might not parse Perl correctly, but that's ok because you can catch the abnormalities in time.
Abigail
In reply to Re: No braces
by Abigail-II
in thread No braces
by jacques
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |