Re: [sv-ec] Mantis 1857 - extern method types for parameterized classes

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Wed Jun 20 2007 - 09:44:17 PDT
Mark Hartoog wrote:
> While we are discussing other alternatives, why don't we consider:
> 
> function C::T C::get();
> 
> This has 'C::' twice, but it seems to be more consistent with
> syntax in the rest of SV. Clearly references like 'C::T' could
> only be allowed in out of body function declarations because
> they would not make sense anyplace else. 

Sure they do.

    C::T  foo;
    function C::T my_function(); ... endfunction;

Both would use the "T" from the default specialization of C
as the type.

The second is exactly the situation I posted originally -- when
you parse C::T you don't know if you are referring to "T" in
the default specialization of C or whether you are referring
to the unspecialized name "T" in the parameterized class
for an extern method definition.

And, as I also posted previously, you could require C#()::T
in such situations but that would be irregular with the
semantics of a reference to "C" in other type contexts.

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 Wed Jun 20 09:44:38 2007

This archive was generated by hypermail 2.1.8 : Wed Jun 20 2007 - 09:45:07 PDT