3 ms·
I know in C# they have the dynamic keyword which allows for dynamic typing when you need it, but lets you use static typing when you don't.
by JamesBarney 12y ago
I know in C# they have the dynamic keyword which allows for dynamic typing when you need it, but lets you use static typing when you don't.
- ufo 12y agoYes, C# and lots of other language have that feature. Where it gets really tricky is if you want to dynamically check the type of functions or objects, since you need to run the assertions when the function/method gets called rather than when the function/method gets assigned to some reference. Its also tricky to give a parametric type to code that is implemented with dynamic types.