develooper Front page | perl.perl5.porters | Postings from December 2008

Re: [PATCH] Class as a Feature (take four)

Thread Previous | Thread Next
December 15, 2008 14:57
Re: [PATCH] Class as a Feature (take four)
Message ID:
On Monday 15 December 2008 14:44:42 Rafael Garcia-Suarez wrote:

> 2008/12/15 chromatic <>:

> > I think class BLOCK by itself is useful (descriptive and simpler syntax
> > for compile-time package scoping and @ISA setting), but it's definitely a
> > required feature before even considering at least the first element of
> > your list.  Certainly it has more value than the similarly small syntax
> > change of allowing 'method where 'sub' is today.

> The work on the method keyword was not only a way to introduce named
> parameters, but also aliasing and compile-time checking. (in a better
> way than prototypes)

Is there a method keyword now?  I was speaking hypothetically of a patch which 
only added 'method' as a synonym for 'sub'.

> > Adding syntax extensions will be a much larger job, as it involves
> > creating a new type of block and defining certain syntactic constructs
> > which are only valid in the block.  (I couldn't see any easy way to use a
> > literal token in the parser where currently you might use the WORD token,
> > for example.)

> You do that in the tokeniser, not in the parser. Perl's tokeniser is
> scarily context-sensitive.

You don't have to tell me twice.  Sadly, I think that gets in the way for this 
sort of thing.

-- c

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About