News for hackers. Stuff that matters.
Re:Golang generics proposal has been accepted by hota_mazi on Wednesday February 10, 2021 @03:31PM (#26094343)
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.

Re:Golang generics proposal has been accepted by erik_seaberg on Wednesday February 10, 2021 @03:37PM (#26094415)
A 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.
Re:Golang generics proposal has been accepted by baby on Wednesday February 10, 2021 @03:36PM (#26094398)
and less readable, less auditable, less understandable, etc.
Re:Golang generics proposal has been accepted by hota_mazi on Wednesday February 10, 2021 @04:36PM (#26095164)
These 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.

Re:Golang generics proposal has been accepted by baby on Thursday February 11, 2021 @06:12PM (#26108785)
Readability 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.