in reply to Re: DWIM Part Nineteen: Unary Operators in Void Context
in thread DWIM Part Nineteen: Unary Operators in Void Context

Seriously, why don't you just implement the behaviour that you want with your own subroutine (or overridden built-in). Don't expect others to agree to your choices. Make your choices and implement what you need. (If you are really tempted, join the Perl6 effort and try to get your suggestions accepted.)

One reason for having p5p as an public mailing list is so that suggestions like this can be made there. The other is reason, of course, is because a good bugfix could come from unknown persons.

I, personally, think the idea has some merit, but I'd be afraid to hurt backwards compatibility (although I can't imagine what current program depends on noop code). I think this would be useful as a module on CPAN, but it would be more useful as a core pragma.

Without asking the opinions of others and seeing who agrees, it is sometimes difficult to determine how useful other people may find a bit of code. I know I would hate to code and recode the same working piece of software to get it ready for public release, only to find out it wasn't wanted. It's not such a matter of expecting others to agree as asking if others do agree.

Personally, I think many of Perl's builtins could benefit from such a check. It would probably be a little too slow and too different from what people know to be a default in a future release of 5. IMHO, it's a great candidate for a pragma in 5 or 6, and possibly a good candidate for the default in 6.

Chris

Update: Corrected a couple of tpyos.
  • Comment on Re: Re: DWIM Part Nineteen: Unary Operators in Void Context