3 ms·
>Strictly statically typed languages preclude the option of going dynamic. No they don't; even in C it's possible to just type everything as void*, and everyth
by logicchains 8y ago
>Strictly statically typed languages preclude the option of going dynamic.
No they don't; even in C it's possible to just type everything as void*, and everything as Object in Java. Just nobody does this 'cos it introduces a bunch of unnecessary runtime errors.
- yorwba 8y agoTo call a method on a void* or a Java Object you first have to explicitly cast it to a type that has that method, which means that you need to declare a common interface and have each object explicitly implement that interface. Duck typing in dynamic languages doesn't require that level of ceremony.