The stupid question is the question not asked | |
PerlMonks |
RFC: Simulating Signaturesby LanX (Saint) |
on Apr 22, 2013 at 17:07 UTC ( [id://1029930]=note: print w/replies, xml ) | Need Help?? |
(I wanted to put this discussion into a separate post, think it will stir much controversy) > argument signatures are lengthy in Perl With the same technique like demonstrated in yield() one could simulate a syntac sugar function sig(), which would assign arguments from the upper caller sig( my($a,$b) ). sig could easily handle a lot more like:
But the need to declare each variable to be lexical is cumbersome, who really wants to constantly repeat my ?
so having a new keyword or syntax would facilitate things a lot something like
... } or even better
while I'm not sure if it's possible to use | w/o dangerous ambiguity.
Cheers Rolf ( addicted to the Perl Programming Language)
In Section
Meditations
|
|