Re: Delphi 2007 Language Feature: Generics



Chris Burrows wrote:


http://mark.michaelis.net/essentialcsharp/

For those who are familiar with the similar, but different, feature
of templates (e.g. as in C++), this document does a good job of
highlighting the differences between them.

I'd be interested to know if Win32 D2007 is going to include all of
the Generics features detailed in this chapter or just a subset?
There may well be some aspects that are not applicable to Win32 - I
don't know.

I havent read the article yet, but in reading this post, a thought
crossed my mind. When you create the "template" code for your generic
class, you have AnyType which could be anything. For simple classes
this is fine, but for complex classes, I can imagine needing to
possibly make decisions on what AnyType is and have the code act
differently. Would it be possible to do something like:

if AnyType is string then
DoSomethingStringSpecific;



--

.



Relevant Pages

  • Re: Needed WordPerfect Feature needed for Word - Help
    ... and then you create new documents from those templates. ... Why doesn't Word have this cool feature?? ... WordPerfect 7 to Word 2007 is a feature that WordPerfect has dealing ... ASK form fields. ...
    (microsoft.public.word.conversions)
  • Re: Fortran templates
    ... problem by MACRO. ... But that feature was voted out due to its ... Resistance to templates in Fortran is likely by the standard body ...
    (comp.lang.fortran)
  • Re: Java vs C++
    ... note that there's not really any theoretical reason a linker could not inspect the object files for redundant code and optimize template usages where possible. ... In that situation, the reason we were using the byte code in the first place was for compression, to help the program fit in memory (it was a relatively large program, running on Mac and Windows computers without virtual memory). ... So the "quoting" feature was important enough to make it worth doing. ... that feature did not rely on C++ templates at all. ...
    (comp.lang.java.programmer)
  • Re: training for Words numbering?
    ... numbering feature. ... am afraid to deal with the numbered styles because the feature seems ... our inherited templates have perhaps been mis-constructed or have ...
    (microsoft.public.word.numbering)