Re: GNAT GPL Edition - on the plus side



"Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> writes:

> I am not sure I have understood what you meant,...

>From your response, I think you understand exactly what I meant. You
propose passing type parameters to (generic) types as opposed to passing
type parameters to (generic) packages. Yes, that's a lot like
discriminants, and I've thought of the same thing myself.

But it's still a lot like generics -- instead of generic packages, we
have generic types. (In fact, in Eiffel, you have generic classes.)

I don't much like the macro-expansion-like semantics of Ada generics
(though it's better in some ways than C++ templates). The need is for
"types parameterized by types". Ada generics do that, and perhaps some
magical discriminants could, too, and perhaps that would be more
convenient.

Are we agreeing or disagreeing, here?

- Bob
.



Relevant Pages

  • Re: Passing information from Unmanaged to Managed code
    ... When I tried using Generics in the interface declaration, ... > declaration, you will have to wrap the whole object, and expose the methods ... >>> generic instance, setting the type parameters, and expose that to COM. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Generic Blues
    ... adding type parameters everywhere, often not really thinking ... I do not recommend adding generics after the fact. ... Normally the simple assertions get you as far as you need ...
    (comp.lang.java.programmer)
  • Re: Anonymous Method/Properties etc with
    ... The big reason is because of the way that generics are handled at run ... The CLR is actually aware of them as generics. ... > type parameters by default because the compiler will complain about ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: light weight types
    ... The perceived complexity of Java-like generics for containers is ... when ArrayList was invented, it was added as some library code, without ... entirely by the compiler (all the JVM has to know is that a given Class ... has type parameters, but it needs not know what the compiler knew about ...
    (comp.lang.java.programmer)
  • Re: Passing information from Unmanaged to Managed code
    ... You would have to create a specific type and expose that to COM, ... public class MyClassInt: MyClass ... fully instantiated Generics can be expose to COM. ... >> generic instance, setting the type parameters, and expose that to COM. ...
    (microsoft.public.dotnet.languages.csharp)