Re: .NET 2.0 to be launched on Nov 8



On 2005-06-21, Jeroen Vandezande <NoSpam> wrote:
>>>
>>> Yes, constraints are very important.
>>
>> I do not see the purpose here, with ordinary strong typed containers. And
>> afaik C++ templates are strongtyped if you define your templates properly
>
> First of all I don't use C++, I use generics in Pascal.

(In Pascal.NET)

> Also the .net generics are definable at RUNTIME...

I'm not interested in generics in .NET. Only in native.

> I can do this:

> Function CreateContainer(atype: TClass): List;
> begin
> Result := List<atype>.create;
> end;

This is not runtime. It is anonymous, which is totally different and not
related at all.

It is comparable to

var x : array[0..5] of byte;

vs

type tmytype= array[0..5] of byte;

var x : tmytype;

.



Relevant Pages

  • Re: .NET 2.0 to be launched on Nov 8
    ... > I do not see the purpose here, with ordinary strong typed containers. ... But if you want generics to be precompiled, you either assume they can do ... Constraints allow you to tell the compiler what kind of operations are ...
    (borland.public.delphi.non-technical)
  • Re: Unmanaged Possibilities
    ... generics is compile time support and not runtime ... .NET generics are bound at compile time, ... .NET generics certainly are typechecked at compile time, ...
    (borland.public.delphi.non-technical)
  • Re: C# generic containers from a "C++ perspective"
    ... expressed as an interface implementation. ... Whatever the reason, if there's no interface, C# generics can't do ... templates are better solved by other techniques, ... Last I checked we were comparing C++ templates to .NET generics. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Delphi: generics coming
    ... Be sure to mention that C++ templates are not the same as .NET generics. ... are a compile time solution, and generics are a run-time solution. ...
    (borland.public.delphi.non-technical)
  • Re: Generics Question
    ... I am asking for academic reasons. ... His reasons for studying generics need not be the ... same as the language designers' purpose for providing generics, ...
    (microsoft.public.dotnet.framework.clr)