Re: globs?
[email protected] (Austin Hastings) Wed, 9 Apr 2003 10:53:12 -0700 (PDT)
| Newsgroups | perl.perl6.documentation |
|---|---|
| Message-ID | <[email protected]> |
--- Larry Wall <[email protected]> wrote: > On Tue, Apr 08, 2003 at 06:18:09PM -0500, Austin Hastings wrote: > : Larry, for the fourth time it has occured to me that saying: > : > : class MyClass { > : has $.attr; > : } > : > : implies being able to say: > : > : class MyClass { > : has $attr; # no "dot" > : } > > I don't think it has to imply that. > > : What do you do when that happens? (Is that the way to do class > vars?) > > No, if it means anything, it means an attribute that doesn't have an > accessor method. But at the moment I don't think it means anything. > > Maybe it's irrational, but I got sick and tired of looking at methods > in C++ and not knowing whether "foo" was an attribute or a variable. > So I'm not eager to put the same ambiguity into Perl. Secondary > sigils in Perl 6 are intentionally aimed at making scope and lifetime > distinctions visually explicit. More specifically, I'm trying to > make a distinction that many natural languages make between marked > and > unmarked constructs. It's the unusual scopes and lifetimes that > should > be considered marked. Ordinary variables don't need to be marked. > It's just a funny kind of Huffman coding, from a linguistic > viewpoint. That's a good point, and a passable explanation. The distinction belongs in the docs, so I'm rerouting this message to p6dox. MikeL, since A12 isn't here, there's no object/class stuff going, is there? =Austin