Randal L. Schwartz writes:
: >>>>> "Nathan" == Nathan Wiger <[EMAIL PROTECTED]> writes:
: 
: Nathan> This is interesting, and in my gut I like it. Many people I've worked
: Nathan> with end up writing:
: 
: Nathan>    @foo[0]
: 
: Nathan> Which works.
: 
: "Works", for some odd meaning of the word "works".  Ever try this:
: 
:         @foo[0] = <STDIN>;
: 
: and then wonder where all the *rest* of your input went?

It's likely to work better in Perl 6.  To mean what it currently
means, you'll probably have to write something like:

        @foo[0] := <STDIN>;

The colon here is not functioning merely to make the assignment look
like Pascal.  It means, in this case, the following operator is
intended to work on arrays, not scalars.  Hence, :+ would be pairwise
array addition.  There will probably be optional modifiers before colon
for various reasons.  This has the result that we could distinguish an
inner:* operator from and outer:* operator.  (Labels would be required
to have whitespace after the colon, in this scenario.)

It also means that every operator has a function name, so you could
call inner:*(@a, @b) or @a->inner:*(@b) or some such.  It might even
mean that we can have a URL literal type, if we can figure out how to
parse it, and if there's any good reason to treat a URL as more than
just a string:

    print $::OUT http://www.wall.org/~larry/index.html;

But I really mustn't spill too many half-digested beans here.  :-)

Larry

P.S.  Larry's Second Law of Language Redesign: Larry gets the colon.

Reply via email to