Re: [sv-ec] class datatype

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Fri May 09 2008 - 13:20:29 PDT
Francoise Martinolle wrote:
>  
> Gordon,
> 
> I think that the rule should be generalized to apply to all class
> specializations of the class itself,
> not just the default specialization. No class specialization datatype of
> the class can be
> referenced until the ; is reached.
> RIght?

That is likely a bit too strong.  I think the following should
be legal:
   class B #(type T = int);
   endclass

   class C#(int p = 7) extends B#( C#(p) );
   endclass

The rationale here is that the uniqueness of
a specialization can be determined without consideration
of the extension so there should be enough type
information around without running into the more
interesting issues.

So I'd be Ok with no self-reference in the parameter defaults (at
least for this rev of the spec) but would not be Ok with disallowing
such references as part of the extension type.

Part of what we'll all need to consider is whether "structural"
composition restrictions should be in place to avoid potentially
common issues that lead to unsolvable systems.  I'm on the
fence on some of that; SV has worked fairly hard to avoid some
kinds of "circularities" in the language but others have
definitely crept in.  I don't know whether we should just give
up on structural restrictions or just restrict the more
"obvious" errors or decide to work on a more philosophically
consistent approach.  Discussions for the next LRM....

Gord.
-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri May 9 13:21:21 2008

This archive was generated by hypermail 2.1.8 : Fri May 09 2008 - 13:21:56 PDT