> >   * There's also no need to distinguish C<use base> and C<use interface>,
   > 
   > Again, I'm not sure. As the RFC shows, it's quite easy to imagine a
   > situation where you have a tangential interface specification that does
   > *not* serve as the inheritance point for your class:

I don't think the RFC shows that at all. Clearly, we *do* need to
differentiate between specifications of classes and specifications
of interfaces because:

        my Classname $var;

applies a different constraint depending on whether 'Classname" is a
package or an interface.

But *because* we're differentiating declarations of classes and
interfaces I'm not clear on why we need to differentiate between
specifying that a class makes use of another class via inheritance and
specifying that a class makes use of another class via an interface.
Why wouldn't:

        use base 'Classname";

do for both? The compiler can certainly tell whether 'Classname' is
the name of an interface or a package, and Do The Right Thing accordingly.
Or are you implying that packages and interfaces would dwell in separate
namespaces? If so: YUCK!!!!!

About the only reason I can see for having distinct declarators *and*
distinct inheritors, is to provide a syntactic belt-and-braces
(much as having the C<sub> declarator and the C<&> prefix).

But such redundancies have never seemed very Perlish to me.

On the other hand, if you can show me an example where there's a critical
difference between C<use base 'Name'> and C<use interface 'Name'>, I'll
happily retract my suggestion.

Damian

Reply via email to