One thing people in “write only” mode seem to forget is that the code you are putting together will…
Carlos E. Perez
62

No, I don’t ignore maintenance. That’s a job that can be either helped or hindered by static types depending on the complexity of type annotations.

Adding types to things does not automatically make things easier to maintain and understand. Sometimes it makes them much harder to maintain and understand, and sometimes static types can paint you into corners and disallow things that would be trivial and perfectly OK to do without them.

For example, static types can make it much harder to deal with things like polymorphism, generics, higher order functions, and object composition.

This is why the `void *` hack exists in C++, which basically acts like an escape hatch for signature declarations. It’s also the primary reason templates and type constructors exist in C++ and Java. To get those advanced, dynamic features, you basically have to break out of the typical confines of the language.

The syntax you need to parse then becomes multi-dimensional: meaning there are two separate contexts you need to be aware of at the same time to understand what the code is doing.

Those kinds of type system hacks are notoriously error-prone, and quite difficult to learn, and notoriously hard to grok again and maintain in the future.

They attract bugs like moths to flames, and consistently trip up junior and mid level devs, and slow down even senior level, advanced developers.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.