No, I don’t ignore maintenance.
Eric Elliott
347

I think you’ve misunderstood a couple of things. The void* hack exists in C++ because C++ has to be backwards-compatible with C, which means supporting void*. In fact it’s not idiomatic in C++ to use thevoid* escape hatch, because you should instead use templates to model generics.

Secondly, templates in C++ and generics in Java are not ‘dynamic’ features. They are statically checked (at compile time) and you will get a compile error if you use them wrong. Also, generics are not outside of the ‘typical confines of the language’ — they are very much a part of the idiomatic language.

Finally, I understand that generic programming and parametric polymorphism can be hard to grok at first; but if you can understand the difference between a list of int and a list of string, you are capable of grokking them.

I’m not sure how to respond to the bits about ‘type system hacks’ being ‘notoriously error-prone’, and attracting bugs like ‘moths to flames’; unfortunately they are very misinformed and are effectively spreading FUD.

One clap, two clap, three clap, forty?

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