develooper Front page | perl.perl6.language | Postings from September 2002

Re: Throwing lexicals

Thread Previous | Thread Next
From:
Me
Date:
September 10, 2002 01:06
Subject:
Re: Throwing lexicals
Message ID:
041d01c2589f$01352660$6401a8c0@ralph
> I'm talking about just in the same namespace, how
> do we keep rules from messing with file-scoped
> (or any-scoped, for that matter) lexicals or globals.
> How do we get rule- or closure-scoped lexicals
> that are put into $0?

How about something like the following rework of
the capture/hypotheticals thing:

You're allowed to declare variables beginning
with a 0 inside rules, eg $0foo or @0bar.

Rules by default capture to $0rulename.

Variables that begin with a digit are rule variables,
all rule variables are always hypothetical, no other
variables are hypothetical.

Drop the 'let' keyword.

--
ralph


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