Re: "Vector" Equivalent



In article <44ebc9da@xxxxxxxxxxxxxxxxxxxxxx>, Erick Sasse says...
Jolyon Smith wrote:

Hope you don't mind, I've logged this in QC - #33013

There is a popular QC report that addresses the same issue.
Please, vote for it:

What I've suggested, inspired by Loren, is not generics - at leat I
don't think so. afaics it addresses a similar need that generics can
also be used for, but can also be used where generics cannot help so
easily.

e.g. if I have a TCustomListView derived class that implements it's own
TListItem type, using my suggestion I can provide an Items property that
reflects that derived list item class without having to implement
property setter/getters that do nothing but act as a type casting
mechanism:

TMySuperList = class(TCustomListView)
:
other super list declarations and stuff
:
public
property Items[Index: Integer]: TListItem as TMySuperDuperListItem;
end;


The list/object list example I used could be handled by generics, but
I'm not sure that the list view case could.

And in the absence of generics for Win32/64, this would at least provide
some relief (and from where I'm sitting it looks to me like this should
be an absolute doddle to implement).

:)


--
Jolyon Smith
.



Relevant Pages

  • Re: .NET generics & the .NET framework: not generic enough?
    ... > suggestion I specifically endorse. ... It'd help out *alot* in data situations where you ... Well, I for one am not a huge fan of operator overloading in general, but it ... is frustrating not to be able to perform basic mathematics with generics. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: "Vector" Equivalent
    ... It still requires having to inherit and redeclare which is ... ANYWAY (and currently re-implement also - the suggestion eliminates the ... I am convinced that my suggestion is a good one (actually Loren's ... generics should be considered to address the need as you perceived it, ...
    (borland.public.delphi.non-technical)
  • Re: .NET generics & the .NET framework: not generic enough?
    ... If you haven't you may want to submit a suggestion at: ... I was actually thinking of the Generic Delegate combined with an anonymous ... > hopes that .NET generics will be a powerful tool to design our programs ... > know them (including easy work-arounds we might be missing). ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: "Vector" Equivalent
    ... What I've suggested, inspired by Loren, is not generics - at leat I ... using my suggestion I can provide an Items property that ... methods that consist merely of a typecast before passing it down to ... do is accept that the inherited code is the code for the declaration. ...
    (borland.public.delphi.non-technical)