Ah . . . one message with two things I wanted to talk about.  Good.

Allison wrote:
> On Tue, Nov 19, 2002 at 01:24:30PM -0800, Austin Hastings wrote:
> > So what's wrong with:
> > 
> > sub foo($param is topic //= $= // 5)    # Shorter form with $=
> > sub foo($param is topic //= $CALLER::_ // 5) 
                            ^^^
Don't I recall Larry saying that C< //= > for setting a parameter's
default value was a Bad Idea, because it means that you can't explicitly
pass C<undef> to foo()?  I thought it'd been changed to C< = > for that
reason.

Or is this piece of code doing something different?

> > It doesn't really seem like we can make it much shorter. Yes, we could
> > convert //= into a single character, but why? People will understand
> > //=. 
> 
> There's not really anything wrong with it. But one of the tricks to an
> elegant language is that it provides syntatic sugar for commonly used
> features, instead of requiring you to type out long arcane sequences.
> The problem is deciding which features deserve the sugar.

(See my remark about three paragraphs down.)

> > The idea of $= as CALLER::_ is good, though.

I'd like to raise my hand in the "please, God, no!" camp, for C< $= >.
One of the things about Perl 5 that I dislike the most is all the $( $>
$- $= $[ $$ special variables.  Yes, we're losing almost all of them - I
think the only one that is really left is $! (*), which I can live with
- but if we're going to introduce more of these, then perhaps we're not
learning from our past mistakes as well as we think we are.

Yes, we've already been through the whole C<use English;> thing and how
no one uses it.  We don't need to talk about it again.  I'm just
expressing an opinion.  Move along, and tell me how these continuation
thingies work again.

Besides: inheriting a caller's topic isn't going to be that common a
thing that it needs such a short name, is it?

> Though C<//= $= //> is a nasty sequence. 

(*) $_ I don't consider special, because my C training leads me to think
of _ as an alphabetic character.  Probably not true in a Perl lexer, but
it's how my brain functions.

-- 
Debbie Pickett http://www.csse.monash.edu.au/~debbiep [EMAIL PROTECTED]
 "I am the eye in the sky, looking at you, I can read your mind. I am the maker
of rules, dealing with fools, I can cheat you blind. And I don't need to see any
       more to know that I can read your mind." - _Eye in the Sky_, APP

Reply via email to