Re:Go 2, here we come
by closeparen on Thursday November 29, 2018 @09:39PM
(#18566164)
It’s C’s lack of complexity which makes it necessary to do dangerous things for everyday purposes. I’d much rather a novice interact with generics, where the compiler is a safety net, than with void * and interface{}.
[ Parent
| on HN ]
Re:Go 2, here we come
by dullgiulio on Friday November 30, 2018 @06:34AM
(#18568347)
void * and interface{} are not going away when generics come. Try searching for "Object" or "<?>" in some Java code...
Which is why Go 1's type system was a bad decision. interface{} should have never existed in the first place.
At least it'll definitely get rarer.
>> It’s C’s lack of complexity which makes it necessary to do dangerous things for everyday purposes.
That's not the case anymore. We have C++ which has generics and "fixed" C's lack of complexity for sure...Now for some 'weird' reasons some people still use C. Wonder why ?
Compare C++ to Standard ML. Simplicity is compatible with generics.
It is not the case since 1993, when CFront was dropped.
In certain domains like UNIX like OSes, I don't see C ever going away, due to the infrastructure, symbiotic relation with the OS that gave it birth, and the culture.