in reply to DWIM Part Nineteen: Unary Operators in Void Context
The second question relates a bit more to the title... After all, "lc $foo;" certainly doesn't DWIM now... and I'm wondering if it's unreasonable to expect Perl to work this way. Certainly, I've been known to want crazy things from Perl before... is this an exception, or just more uneducated rambling?
In a language like Perl, where you can define your own subroutines and even override the built-in functions (see Camel III, Chapter 11, Overriding Built-in Functions, p. 306), and do that even so that other modules can't detect it, I see really no reason for you to expect that the perl that *all we others* get should do what *you* want.
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.)
To quote Alan Perlis again: "Invent and fit - have fits and reinvent."
Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
die if $Redefine > 0.01 && $Document < 2*$Normal
by dragonchild (Archbishop) on Aug 21, 2001 at 16:15 UTC | |
|
Re: Re: DWIM Part Nineteen: Unary Operators in Void Context
by mr_mischief (Monsignor) on Aug 21, 2001 at 19:02 UTC |