Freigeben über


Generics in the clr

I'm currently reading the Generics document from MS Research and I came across:

1.3 Summary of the Implementation

Almost all previous implementation techniques for parametric

polymorphism have assumed the traditional compile, link and run

model of programming. Our implementation, on the other hand,

takes advantage of the dynamic loading and code generation capabilities

of the CLR. Its main features are as follows:

1. “Just-in-time” type specialization. Instantiations of parameterized

classes are loaded dynamically and the code for their

methods is generated on demand.

2. Code and representation sharing. Where possible, compiled

code and data representations are shared between different instantiations.

3. No boxing. Due to type specialization the implementation

never needs to box values of primitive type.

4. Efficient support of run-time types. The implementation

makes use of a number of novel techniques to provide operations

on run-time types that are efficient in the presence

of code sharing and with minimal overhead for programs that

make no use of them.

it's really exciting to read this, they are going to implement Generics at runtime too and not just on compile time.

*Update: thnx to Dumky for the links

Comments

  • Anonymous
    June 23, 2003
    You should read the pdf that describes the Generics in the SSCLI (Rotor), by MS Research folks:
    http://research.microsoft.com/projects/clrgen/

    The pdf address is:
    http://research.microsoft.com/projects/clrgen/generics.pdf

    Cheers
    Dumky
  • Anonymous
    June 23, 2003
    thnx
    that's the one I'm reading but I think it targets the clr and not only rotor
  • Anonymous
    June 23, 2003
    Your trackback ping got wrong. Try this page instead:
    http://blog.monstuff.com/archives/000025.html
  • Anonymous
    June 23, 2003
    fixed it.