Talk:Single-level call rule and generics

Revision as of 08:16, 15 July 2007 by Juliant (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Look very close to my suggestion, only that I had suggested to reuse the keyword 'invariant' instead of introducing a new keyword 'monomorphic', that not average developer will understand --Schoelle 14:02, 15 July 2007 (CEST)

--Juliant 19:16, 15 July 2007 (CEST) This is a different problem. Your proposal about invariant generics is about conformance between generic parameters, i.e. conformance between X [A] and X [B]. What I'm trying to point out is the use of features on a formal generic parameter which are covariantly redefined. The possible solution for like Current features with the monomorphic keyword is about the instantation of the generic. A monomorphic generic can only be instantiated with a monomorphic type.

You can also look at it that way: With your invariant generic, you can use the generic as a feature argument. With a monomorph generic, you can call covariant features which have like Current in the argument.