3 ms·
The dynamic type was added to C# to facilitate interoperability (ex. DLR), not so much to encourage lazy devs to get their bugs at runtime rather than compile t
by avip 9y ago
The dynamic type was added to C# to facilitate interoperability (ex. DLR), not so much to encourage lazy devs to get their bugs at runtime rather than compile time.
- pjmlp 9y agoAdditionally to simplify dynamic dispatch calls on COM.
- willtim 9y agoI still do not understand why this cannot be done via a Variant type. Also it doesn't explain why Dart 2 has a similar feature.
- barrkel 9y agoThink of dynamic as a different word for Variant. The semantic differences for OLE2 Variants vs C# dynamic mostly only exist in implementation protocols.
- masklinn 9y ago> I still do not understand why this cannot be done via a Variant type. Makes little difference, either way you need a magical type since it has to allow any method call at compile time, and then requires enough RTTI that it can check for and dispatch method calls at runtime. Whether you call it Variant or dynamic has no relevance.