6 ms·
PHP was also hugely successful, success is not the criterion by which this kind of feature should be decided. The bottom line is that generics allows the produ
by hota_mazi 6y ago
PHP was also hugely successful, success is not the criterion by which this kind of feature should be decided.
The bottom line is that generics allows the production of safer, more robust, more evolvable, more documented, more performant, code.
Along with static typing, generics are simply a feature that no language created recently should be without.
- baby 6y agoand less readable, less auditable, less understandable, etc.
- hota_mazi 6y agoThese are all subjective aspects which often confuse unfamiliarity with obfuscation. I can read generic code in multiple languages even when I'm not fluent in these languages. Once you get used to generic code, it actually becomes easier to read and understand than code where everything is type cast or Object typed all over the place.
- baby 6y agoReadability is far from subjective, if 50% of your devs can’t read parts of the codebase then it’s not readable. Simple generic code is fine, but generics can be abused to over engineer things.
- erik_seaberg 6y agoA successful language requires less effort to solve your problem. That's why we create them, and it's strange how languages keep becoming popular without nailing this.