3 ms·
> Labelling it a workaround is disingenuous if people are claiming they prefer writing code in that manner. Well, I've never seen a Go expert espouse this opin
by jasode 11y ago
> Labelling it a workaround is disingenuous if people are claiming they prefer writing code in that manner.
Well, I've never seen a Go expert espouse this opinion. Do you have a web article that actually says that? What I see is that many experts just carry on being productive in Go in spite of not having generics but that's a different position than actually preferring to copy&paste code or add a preproc code-gen (as Rob Pike once suggested as a workaround).
>And if you write code in this manner anyway, the simplicity in the language makes a big difference.
One can write in "that manner" whether generics was there or not. Existence of generics doesn't take away the ability to continue with suboptimal techniques such as copy & paste of redundant code for different data types.
- Veedrac 11y ago> Do you have a web article that actually says that? That says what? That they don't find not writing generics problematic? Rob Pike has said so himself. The article you've just read says exactly this[1]. [1] "With no generics, you are discouraged from making big, overly-general abstractions. This might be on purpose." > One can write in "that manner" whether generics was there or not. I have a feeling we're talking past each other. I'm saying that if you're not going to use generics, there's no point paying the costs of having generics. Not paying the cost means you get a simpler language, which has run-on benefits I mentioned before. I'm not saying that generics are bad, or that emulating generics with copy & paste is better than generics.