in reply to Re^11: Is there any difference between prototype % and @ ?
in thread Is there any difference between prototype % and @ ?
hgrep {...} hmap {...} %h
???
Your trying to convince me that breaking the established interface is OK because there "is no use case".
(or to be precise that I have to show a use case while you don't try to prove that there is none)
I'm saying it's safer to respect symmetry because nobody can anticipate all use cases, not even you.
I don't say your code doesn't make sense from a performance analysis, BUT then
A good design avoids traps and misunderstandings w/o overloading the language with edge cases!
Cheers Rolf
UPDATE:
Since I thought that uneven lists should be disallowed anyway, I think it's not too dirty to consider a single argument to be a hashref.
Like this both hgrep \%h and hgrep %h would work and could be chained.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^13: Is there any difference between prototype % and @ ?
by BrowserUk (Patriarch) on Feb 23, 2013 at 23:42 UTC | |
by LanX (Saint) on Feb 24, 2013 at 03:34 UTC | |
by BrowserUk (Patriarch) on Feb 24, 2013 at 08:37 UTC | |
by LanX (Saint) on Feb 24, 2013 at 09:55 UTC | |
by BrowserUk (Patriarch) on Feb 24, 2013 at 10:16 UTC | |
|