Re: "Vector" Equivalent



In article <44f2e0bc@xxxxxxxxxxxxxxxxxxxxxx>, Brian Moelk says...

Apologies with a "but" really aren't IMO.

Well it really wasn't, so you were right to think that.

;)


But alas, I still don't agree since I believe it doesn't save one that
much anyway. It still requires having to inherit and redeclare which is
the bulk of the pain IMO.

Declaring a class is trivial, and enabling the expression of a cast in
the declaration completely captures the required implementation. It
saves the work that can be saved without losing any clarity in the
interface (in fact imho it improves it - it makes it clear that the
inherited property/function is not changed in terms of behaviour, only
in terms of expressed type, something that is not necessarily or always
the case with a re-implementation).

And again you seem to be ignoring the fact that in the case of a
TCustomListView implementation (or similar) you are having to redeclare
ANYWAY (and currently re-implement also - the suggestion eliminates the
need to re-implement "manually" as it allows the compiler to provide the
implementation automatically).


IMO, the tone of your responses show that you don't feel confident in
your justification

No, I am convinced that my suggestion is a good one (actually Loren's
suggestion, I just changed the suggested keyword to one that is already
used in a very similar fashion). But I don't appreciate being
criticised when the critic seemingly hasn't understood and suggests that
further explanation and clarification is needed despite it being laid
out in very clear terms already.

It seemed apparent to me that you had a bee in your bonnet about
generics and weren't inclined to consider that anything other than
generics should be considered to address the need as you perceived it,
and any other perceived need was mistaken.

So far I don't see that you've said anything to suggest that I was wrong
in interpreting your post that way.


I'm sorry if you don't like the tone - perhaps if you look at your own
posts you might understand why things went South on that score.

Making a comment like "Not even close" about a suggestion whilst
apparently not understanding what the suggestion even is....


Inherit or encapsulate, type a little bit more and don't be lazy. ;)

Then we don't need generics either.

;)

--
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
    ... What I've suggested, inspired by Loren, is not generics - at leat I ... TListItem type, using my suggestion I can provide an Items property that ...
    (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: Simple script does not work
    ... The problem with that suggestion is that the target element is a table ... Be careful when using the word "inherit" with CSS: ...
    (comp.lang.javascript)
  • 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)