3 ms·
My suspicion is that what makes this hard is using higher-order dynamic programming facilities. If you just stick to first-order functions with relatively simpl
by dwohnitmok 4y ago
My suspicion is that what makes this hard is using higher-order dynamic programming facilities. If you just stick to first-order functions with relatively simple data structures and primitive types then there's a lot of cool, interesting runtime gadgets you can put in.
But the moment you try to use the full arsenal of dynamic reflection, metaprogramming, etc. then the runtime checks and gadgetry needed to analyze all of that explodes in complexity and even if it's possible to make an analysis framework capable of analyzing it, the results might be very difficult to interpret.
So as long as you try to stick to first-order constructs as much as possible, you can get quite far.
- int_19h 4y agoBut, conversely, the simple cases that you describe can be handled quite nicely without losing static typing. You just need union types, and some simple type inference. So then why bother with dynamic at all?