On Sat, Mar 13, 2021 at 1:44 PM Martin Schnabel <m...@mb0.org> wrote:

> as far as i know there is no reason that anybody has to write code with
> generics when they are available. therefor i really don't understand the
> negative mails to this list.

That nonchalantly ignores that code is way more often read than written.

"Clever" use of preprocessing macros can make C code unreadable to
anyone other than its author unless learning the mindset behind the
macros. Symbols in the binary can have very little connection with the
symbols in the source code. Nice tar pit for transpiling/debugging
etc. I believe that's why Go does not have C macros or anything like
that.

The problem with generics is not the same, but it shares some of the
problems depicted above. The no more existing 1:1 symbol mapping is
the one I regret most by a wide margin. Goodbye easy and simple
grepping.

Good use of generics _will_ be good for Go, don't get me wrong about
this. But, when looking at random code in the wild, let me ask: What's
the ratio of poor vs good code one encounters at random?

And don't get me wrong the second time. I'm writing a lot of poor
code. Once I start using generics, my future self will be probably the
first one to curse me for that.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA40n-V6RgDNd4KCf04K0a_7DM8aLoOd7CcSAE%2B7_XULS8Go8A%40mail.gmail.com.

Reply via email to