On Tue, May 15, 2001 at 03:02:44PM -0700, Nathan Wiger wrote:
> The only worry/problem/etc that I wonder about is the potential overuse
> of the "is" keyword. It is a very nice syntactic tool, but when I see
> something like this:
>
> $*ARGS is chomped;
>
> I wonder if that wouldn't be better phrased as:
>
> autochomp $*ARGS; # $ARGS.autochomp
Is that autochomp as a keyword or autochomp as an indirect method call
on $*ARGS?
> The thing I worry about is this: I don't think actions should be
> declared using "is", necessarily.
>
> $STDERR is flushed;
> $var = $ARGS is read;
> $STDOUT is printed to "Hello, World!\n";
This could be argued 'round and 'round as to what's an action and
what's a property. 'chomped' and 'flushed' make sense as properties
as they are descriptive. You're setting a property which the variable
will take into account in its actions. Whereas things like 'read' and
'printed' are immediate actions.
I suppose the best distinction is right there in your example.
flushed and chomped don't do anything immediately, whereas read and
printed do.
TMOWTDI I suppose.
> Without the extra new ambiguity. Thoughts?
Put down the indirect object syntax and step away from the keyboard
with your hands up! ;)
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl6 Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
<purl> Hey Schwern! honk, honk, honk, honk, honk, honk, honk, honk,
honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk,
honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk,
honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk,
honk, honk, honk, honk, honk, honk, honk, honk, honk, honk!