4 ms·
The "dynamic" keyword [1] is my favorite blunder in C#. It's great if you are use it for COM interropt but it's awful otherwise. The code compiles but from tim
by _old_dude_ 5y ago
The "dynamic" keyword [1] is my favorite blunder in C#.
It's great if you are use it for COM interropt but it's awful otherwise.
The code compiles but from time to time it fails at runtime and performance are sometimes Ok, sometimes not depending on the call stack.
[1] https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/using-type-dynamic https://docs.microsoft.com/en-us/dotnet/csharp/programming-g...
- sterlind 5y agodynamic is amazing for the extremely niche use case of interop with dynamic languages. I had a system which executed Python scripts on devices using an orchestrator written in C#. With dynamic and IronPython, I could seamlessly unit test the whole enchilada without writing un-Pythonic Python or ugly C# wrappers.