Re: "Vector" Equivalent



Jolyon Smith wrote:
See other post - generics don't actually help in all the cases where
this capability would be of use.

Can you give a specific example here? I reread your other post and
still don't see it.

The object list is a poor example because it is something that generics
could be used for. But specialising the type of an inherited property
from an existing base class isn't something that generics can do for you
aiui.

No, but generics would be used in a better/improved implementation of
those container classes which would obviate the need for what you're
suggesting. IOW, TObjectList would be implemented in a different way,
using generics, so that you wouldn't need to inherit from it at all.

They are different things, even though in isolated examples they can
look very similar.

I guess I'm just missing it, can you explain it more thoroughly?

--
Brian Moelk
Brain Endeavor LLC
bmoelk@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
.



Relevant Pages

  • Re: Generics and Type casting.
    ... structure the compiler would also have to write in run-time type ... generics added the capability to have collections ... what's allowed in the collection for certain purposes. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Generics with List and Delegates?
    ... I believe I am stretching the capability ... | what generics can do for me but here goes. ... of generic delegates, they would have to be bound to one particular type. ... Consultant Software Engineer ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: "Vector" Equivalent
    ... In article, Brian Moelk says... ... this capability would be of use. ... The object list is a poor example because it is something that generics ... Jolyon Smith ...
    (borland.public.delphi.non-technical)