Hacker Newsnew | comments | ask | jobs | submitlogin
frou_dh 426 days ago | link | parent

Whether generics get retrofitted will be the measure of this. I suspect they won't, because by the time a Go 2.0 timeframe arrives, the thinking will be something like "Time has shown that we thrived without them, so despite commentator gnashing, they're simply not required."


shurcooL 426 days ago | link

It's possible to write tools that generate code instead of building it into the language too. I wonder if it can be done better than building it into the language.

-----

dchest 426 days ago | link

Here's one https://github.com/droundy/gotgo

-----

frou_dh 426 days ago | link

You could contrast achieving generics using C preprocessor gymnastics versus C++ templates.

-----

shurcooL 426 days ago | link

C preprocessor stuff works with text and text only. That's why it's quite hard to make things elegant. Tools can work with text and anything else you can think of. So they can potentially be better. But I don't know what could be done at this point (in fact, this might be a good problem to be analyzed from a theoretical side).

-----




Lists | RSS | Bookmarklet | Guidelines | FAQ | DMCA | News News | Feature Requests | Bugs | Y Combinator | Apply | Library

Search: