4 ms·
I'd guess the names of properties being possibly dynamically computed also makes things difficult to optimise.
by userbinator 11y ago
I'd guess the names of properties being possibly dynamically computed also makes things difficult to optimise.
- jestar_jokin 11y agoA clever compiler might be able to infer "structural typing", which is basically "duck typing" done at compile time. So, if you add a property "bar" to an object "foo", and you have some other code that calls "baz.bar", you can infer that "foo" is of type "HasABar", and "baz" is of type "HasABar", therefore it might be safe to use "foo" in place of "baz". The tricky part would be consolidating every structural subtype into cohesive classes.