by coldtea · 11y ago · 0 comments
Oh, it's clear by now. Though "essential" is a weasel word -- in a way nothing is essential in the sense you can do it all with assembler too.
>Generics are incredibly complex in both semantics and implementation. There are considerable trade-offs to consider, such as do you want a larger binary vs. slower binary vs. larger source code.
Unless I use them, I get none of those downsides. And when I need them, I now have to implement support for my types manually, which results in larger source code anyway.
And "larger source code" hasn't been a problem since 1980.
>Language features without competition: goroutines, interfaces, defer (now in Swift)
Those have been around in several other languages... Hardly "without competition".
>Tools without competition: fast compiler
It's fast because it's not doing much. And there are several compilers that are fast too.
The null compiler (which produces nothing) is even faster, but 1000s of orders of magnitude.
As you can see I'm not in favor of the choices they made to make the compiler fast.
It's not much of a feat -- it's like writing a 8-bit era like game, and bragging that it gets 2000 fps performance.
First, after 60 fps it's dimminishing returns anyway, and second, yes, but at what cost?