On 7/21/05 8:14 PM, Larry Wall wrote:
> On Thu, Jul 21, 2005 at 03:25:17PM -0400, John Siracusa wrote:
>> The only thing I immediately don't like is the use of the normal identifier
>> character "_" to indicate the "specialness" of a particular variable (or
>> attribute or whatever we're calling them these days).  IMO, a "_" should
>> just be a "_" no matter where it occurs.  Making a leading "_" mean
>> something special (triggering a slew of new semantics) in a particular
>> context seems a bit hacky to me.
>> Damian may not like the colon, but I couldn't help thinking that the "_"
>> could be replaced with ":" and things would be cleaner.
> Well, but the _ really is part of the name, insofar as it's trying to
> isolate the namespace.  Even with : we had to say that it would probably
> be stored in the symbol table with the leading colon.

Eh, an implementation detail (or, arguably, syntactic sugar for symbol table
lookups, depending on how it was "really" implemented in Parrot).

> Plus history is on the side of leading _ meaning "private implementation
> detail"

Sure, by *convention*, not as imperative magic :)

> and the : is awfully confusing in the neighborhood of adverb pairs.  If it
> were just sigiled variables, the : would probably be fine, but
>     method :foo() {...}
> just has a strangeness to it that won't go away.  Arguably that's a feature,
> but I'm mostly worried with visual confusion with all the other colons
> in Perl 6.

I'm not married to the colon.  Speaking of traits and adverbs, why not use
one of those in the "has" declaration instead?  That'd certainly be a lot
more explicit than the magic leading underscore (although I'm at a loss as
to what the trait would be named...)


Reply via email to