develooper Front page | perl.perl5.porters | Postings from August 2001

RE: prototype ideas

Thread Previous | Thread Next
From:
Brent Dax
Date:
August 1, 2001 00:16
Subject:
RE: prototype ideas
Message ID:
FJELLKOPEAGHOOODKEDPOEHPCDAA.brentdax1@earthlink.net
# On Tuesday 31 July 2001 08:43 am, Hugo van der Sanden wrote:
# > "Jeff 'japhy/Marillion' Pinyan" <jeffp@crusoe.net> wrote:
# > :I'm not sure we need to employ the ENTIRE regex engine on this.  There's
# > :very little that needs to be support in my opinion.
# > :
# > :  $  -> force scalar context
# > :  @  -> slurp rest as a list
# > :  %  -> ensure even number of args (?)
# > :  *  -> glob-erize
# > :  &  -> code-block (need 'sub' if non first arg)
# > :        (I'm trying to make it turn EXPRs into BLOCKs)
# > :  .  -> make sure there's an argument there
# > :        (this involves unrolling array or hash or slice or function!)
# >
# >    /  -> force regexp context (for split-like semantics)
# >
# > ??
# >
# > Hugo
#
# While you are brainstorming, how about '_' as a potential first argument for
# the builtin "implicit $_" argument to complete the emulation?

	sub mysplit(/_;$) {

++ to that one.  This would also help editors like Visual Perl which make a valiant attempt to tell
you what the prototype is like in layman's terms.

This is shaping up to be a nice upgrade of prototypes.  The end result should be pretty awesome!

--Brent Dax
brentdax1@earthlink.net


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About