Hacker News new | ask | show | jobs
by naasking 2959 days ago
That's not why the dynamic type was created, that was just one side benefit. The dynamic type grew out of the IronPython effort which grew into the DLR in order to better support dynamically typed languages on the CLR, by having reusable polymorphic inline caching for efficient dispatch.

COM integration with the CLR has existed since the beginning, which I used quite extensively many years ago, they just took advantage of the DLR to make it easier.

1 comments

Still given that it was already available as Variant on Visual Basic before .NET was even an idea, it hardly has anything to do with "which grew out of the work on gradual type systems.".
Visual basic is hardly the first language with a dynamic type, and the DLR is clearly descended from Self, Smalltalk and other dynamically typed languages and started with Iron Python:

https://blogs.msdn.microsoft.com/hugunin/2007/04/30/a-dynami...

VB's variants and COM were not a consideration when conceiving of or designing the DLR, merely a convenient application.

Furthermore, integrating a dynamic type into C#'s type system absolutely built in the work on gradual typing. See their published work: https://www.researchgate.net/publication/221496299_Adding_Dy...

Thanks for the paper, that changes my point of view.