Thanks Jenda. Jenda Krynicky wrote: > > 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. > > > > 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 ;-).
On the contrary, it took some time before people /stopped/ sharing things :-D And yes, 'my' is older than 'our', but lexical variables are newer than global ones! > Plus 'our' does not actually create anything. Not strictly, no. But I'm thinking very much in the DWIM frame of mind. > 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. Not in that sense, but I don't believe Perl would have been designed that way from scratch. /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]