On Fri, Apr 06, 2001 at 11:17:49AM -0700, Larry Wall wrote:
> Hence, :+ would be pairwise array addition.  
Sounds quite reasonable.  

> 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.
Hm.  If I assume that s/:/::/, I like it.  Otherwise, I really really don't.
Why?  Because it introduces more namespaces (and probably syntax) when they
aren't really neccessary.

If you use a ::, and make packages able to define operators straight-up,
then you could do, say, $a dB::+ $b.  There would be a :infixable attribute
on subs, so you could make infix operators with arbitrary names:

use Game::DnD 'D';
$hp = 3 D 6;


> 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;
Please, no!  A URL isn't a /new/ type of literal, really.  Either it's a
wierd form of a literal list, or it's a wierd type of file name, so you should
open() it.  Or it's a self-quoting literal, like Packagename::.  If you
really want to be able to read from a URL in one line, let yourself do
<open(foo)>.  But make opening a URL an explicit act.

> But I really mustn't spill too many half-digested beans here.  :-)
If you have to, at least do it in the toilet.

> P.S.  Larry's Second Law of Language Redesign: Larry gets the colon.
May He (or You) do Good Things with it.

    -=- James Mastros
-- 
The most beautiful thing we can experience is the mysterious.  It is the
source of all true art and science.  He to whom this emotion is a stranger,
who can no longer pause to wonder and stand wrapt in awe, is as good as dead.
        -=- Albert Einstein
AIM: theorbtwo       homepage: http://www.rtweb.net/theorb/

Reply via email to