From: "Rob Dixon" <[EMAIL PROTECTED]>
> David Wall wrote:
> > Rob Dixon wrote:
> >
> > > Lexical variables are another matter, as they don't belong to a
> > > given package but exist globally as long as there is a reference
> > > to them. In my opinion this is a bit of a hack, but access can be
> > > limited by creating data that is accessible only by reference, so
> > > that code can reach that data only if it has been given a
> > > reference to it.
> >
> > It doesn't seem like a hack to me; it lets you use closures.
> 
> Yes, I knew it would be controversial :)
> 
> But my problem with it is that it has the feel of an afterthought
> (which it was - Perl never used to have lexical variables). A 'my'
> declaration is too visually similar to an 'our' declaration when it
> creates a completely different type of object.

Erm. 'my' is older than 'our' (just like in human history. It took 
some time before people started to share things ;-).

Plus 'our' does not actually create anything. 

I don't think Perl4 is a valid reason to call anything in Perl5 an 
afterthought. Unless you call the whole of Perl5 an afterthought.

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to