3 ms·
> One cannot have both I guess? Not to be snarky, but... The whole point of LISP-style macros is that you very much can have both. Ultimately, generics will c
by jballanc 8y ago
> One cannot have both I guess?
Not to be snarky, but...
The whole point of LISP-style macros is that you very much can have both. Ultimately, generics will compile down, either via type erasure or a generated specialization, to a "copy-pasted" function (in concept, at least). With a macro, you have ultimate control of how this is achieved.
The problem, of course, is that the people who care how generics are implemented all think their way is the best (leading to a proliferation of slightly-different-and-incompatible implementations), and everyone else just wants something that works fast and reliably.
Bad code can be written in any language. Good code can be written in most languages (yes, even C++...the jury is still out on PHP). Every feature that grants power comes at the cost of potential complexity. What ultimately determines success or failure is the community and best practices that develop around these features.
In this regard, I think Go will be "o.k." even with generics.