3 ms·
> As for duck typing, why would that make a language slower exactly? I assumed it would result in basically every operation to require multiple lookups to figu
by Sohcahtoa82 4y ago
> As for duck typing, why would that make a language slower exactly?
I assumed it would result in basically every operation to require multiple lookups to figure out how types would interact at runtime. Like a simple "foo.bar(biz + baz)" would have to check the types of biz and baz, figure out how to add them, then look up the foo object and make sure it has a function named baz, and then call it.
I assumed all these lookups and verifications would add significant overhead.