On Wed, Oct 27, 2004 at 01:19:29PM -0600, Luke Palmer wrote:
> Stéphane Payrard writes:
> > That would allow to implement typechecking in imcc.
> > 
> >   .sym Scalar a
> >   a = new .PerlInt  # ok.  Perlint is derived from Scalar
> 
> Ugh, yeah, but what does that buy you?  In dynamic languages pure
> derivational typechecking is very close to useless.  The reason C++[1]
> has pure derivational semantics is because of implementation.  The
> vtable functions have the same relative address, so you can use a
> derived object interchangably.  In a language where methods are looked
> up by name, such strictures are more often over-restrictive than
> helpful.

So, still thinking (too?) statically, I should probably worry
about what "does" a pmc instead on what it is derived from. In
that case, I would not have to worry about abstract pmc classes.
So abstract classes missing from the enum of
core_pmcs.h, which prompted that subthread,  becomes a moot point.

> 
> Anyway, that's just my rant.  If such a thing is to be in imcc, it
> _must_ be optional without loss of feature.  I have quibble with the
> automatic typechecking of .param variables for the same reason.

Declaring a symreg just as a pmc would do that anyway.

> 
> Luke
> 
> [1] And the reason Java has it is because C++ did.  Great design work,
> guys.
> 

--
 stef

Reply via email to