Over and over the same discussion takes place in various forums: static typing (compile time) vs dynamic typing (run time). For me, these discussions seem to miss the point.|
I feel the problem is that we are forced to choose between static typing and dynamic typing, whereas we would actually like to have both (and to have them whenever we choose).
Forgive the bad analogy - it's like working with metal.
Heat the parts you need to change until they are malleable (fewer physical constraints), work them into the shape required, let them harden; and check that they fit into the hardened (physically constrained) pieces we've already made (and never re-heated). Reheat and rework as required.
I'd like to be able to selectively soften the type system, just for the pieces I need to work on, and then harden the type system so I can check the fit with other pieces (which kept their hardened type system throughout this process).
There are type-inferencing languages that provide some flexibility (like OCaml); but these languages don't seem to allow the developer to control when type-information is used or ignored.
Does anyone know of languages that give the developer power over the type-system?