On Thu, Mar 11, 2004 at 01:18:52PM -0800, chromatic wrote:
: On Thu, 2004-03-11 at 13:04, Larry Wall wrote:
: : > Well, okay, not a boolean. More like a troolean.
: : Unless it's a falselean.
It's more truelean than falselean by a 2/3rds majority. And it's much more if you include 2, -2, 3, -3,... in the data type. And it's *very* much more if you include the reals....
So that's a (numeric) scalar then...
I'm new to this list, although I've been keeping an eye on Perl 6 for quite a while now as it's looking like it's going to be an extremely pleasant language to work with. Seems I joined at the right time as well, for these mutators are an interesting thing. Please excuse my no doubt numerous abuses of conventional formatting used here as I don't know it yet, and I've got a very shaky knowledge of some parts of the Perl 6 grammar that everyone posting seems to know.
However, it strikes me that notation like
int method =foo(String $bar) {...}
is at risk of causing serious confusion to people coming from other languages. This may not be a concern, of course (and isn't really one of mine despite being a C++/Perl 5/Haskell kind of person at the moment). It seems that
int method self:foo(String $bar) {...}
is clearer and easier to read, but I did actually prefer
int method mutate:foo(String $bar) {...}
or
int method inplace:foo(String $bar) {...}
which seem to have been dismissed in favour of the form using C<self>, although I can see that it does have a valid interpretation. Perhaps I'm just too stuck in writing member subs of objects in Perl 5 by saying
sub foo { my $self = shift; # something useful here }
so I always see 'self' as reading something like 'this' does in C++ or Java (or as 'self' does in Python, if I'm remembering that correctly). There is undeniable logic in using it to define mutators though, as they do most certainly act upon 'self' or 'this' or whatever it's called.
One is lead to wonder if the most appropriate definition might not be
int method mutator:foo(String $bar) { ... }
but that's getting very silly, so maybe just ignore everything I said just now and cheer the introduction of C<self> as the most practical and least prone to the introduction of finger trouble.
And having said all that, I like .= as invocation syntax for it, even if I keep thinking it means 'append string'.
Anyway, thankyou for listening, I shall return now to watching in awe.
Matthew