develooper Front page | perl.perl6.language | Postings from May 2001

Re: Apoc2 - <STDIN> concerns

From:
Nathan Wiger
Date:
May 7, 2001 13:28
Subject:
Re: Apoc2 - <STDIN> concerns
Message ID:
20010507132752.A24121@west.sun.com
* Simon Cozens <simon@netthink.co.uk> [05/07/2001 13:17]:
> 
> Bother. Well, you'd have to quote it, but then you wouldn't really have
> a hash key called => that often, either.

Yeah, but you couldn't make use of a way to assign alternate values without
some specialized syntax. I don't think this:

   %h = <foo bar baz(2)>;

Is any "cleaner" than this:

   %h = qh(foo bar baz => 2);

It's just different. And in fact will require much more explanation than
the simple "qw is 'quote words', qh is 'quote hash'. You can use any
delimiters you want."

> > I think Uri's qh() suggestion is the cleanest:
> 
> Interesting train of thought, since one of the ideas was that qw() is
> ugly and has to go. (Larry's been saying this for nearly two years now,
> it's just that people sometimes don't listen. :) Let's keep it and add
> something similarly ugly to keep it company!
>
> -- 
> And the fact is, I've always loathed qw(), despite the fact that I
> invented it myself.  :-)
>              -- Larry Wall in <199911021845.KAA01167@kiev.wall.org>

Yeah, that's too bad. ;-) But I still don't think that we're gaining
anything by introducing a non-extensible, special-cased op into the
language. Isn't this just the type of thing we're trying to get rid of?

I'm not against a "cleaner" way to do qw() in principle, but I
definitely think <> is not it for a lot of reasons (glob, readline,
can't use =>, iterators, ...)

-Nate




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About