On Mon, Mar 17, 2003 at 10:56:51AM -0700, Luke Palmer wrote:

> Assuming the obvious inheritance, Vehicle.set_speed() would be called.

Ok good, that's what I thought.  Thanks.


> No.  Rules fit better in a grammar than subs, and help the psychology
> of people in various ways.  For instance:
> 
>     multi subst(Str $str: Rule $match, Code $repl) { ... }
> 
> Helps people to know that $match should be a regex.  Helps the
> compiler, too.
> 
> Also, it looks nicer:
> 
>     sub identifier {m{ <[\w]-[\d]> \w+ }}
>     rule identifier { <[\w]-[\d]> \w }

I personally don't see a lot of difference between those two, but I'll
go with you on the "helps people know that $match should be a regex"
point.  Good enough.


> > ====QUESTION 
> > - SUPER:: is mentioned on page 9.  Was this an analogy, or a
> > demonstration of intention to keep it?
> > ==/
> 
> I think there was intention to keep it.  It's a useful thing, you
> know.

Yes, indeed; I knew there would be SOMETHING that would fill this role
in P6.  I just wanted to know if it would actually be the same token
with the same semantics, or if Larry had some plan to totally
hyperrenoberate how inheritance works and superclasses are accessed
(which he well may...we'll need to see A12, I suppose).


> > ====QUESTION 
> > - Regarding <== and ==>:
> 
> I'm not too happy with the semantics of ==> and <==, but they might
> grow on me... we'll see.  Anyway, yes it is redundant.  Just as
> postfix C<if> is redundant with C<and>.  It's still a useful thing to
> have, in terms of readability.
> 
> And like most things in Perl, it can also be obfuscatory, given the
> proper guise.

Good enough.  I wasn't slamming the operator in total--I think it's
fine.  I simply found this particular usage a bit awkward.

OTOH, I think this is wonderfully clear:

@data ==> map {} ==> sort {} ==> map {}  ==> print;


--Dks

Reply via email to