Re:First chapter of Kernighan and Donovan's new Go book [pdf]
by xrstf on Monday October 19, 2015 @03:50PM
(#10415225)
Which is why Go is advocating using "go generate" to generate code. See projects such as https://clipperhouse.github.io/gen/
[ Parent
| on HN ]
Re:First chapter of Kernighan and Donovan's new Go book [pdf]
by masklinn on Monday October 19, 2015 @04:28PM
(#10415488)
A fantastic idea, even slower to compile (since you need to parse extra source files), more complex workflow, and extra files which developers have to remember to ignore.
Re:First chapter of Kernighan and Donovan's new Go book [pdf]
by yokohummer7 on Monday October 19, 2015 @10:17PM
(#10417043)
This is exactly the case that the problems of a language are solved by tooling. This attitude can be easily found in the Java ecosystem, where the answer to every question is "to use IDE". Interestingly, Java recently abandoned the idea of feature stagnation and started improving the language. I'm curious when this will happen to Go.
Re:First chapter of Kernighan and Donovan's new Go book [pdf]
by AnimalMuppet on Monday October 19, 2015 @06:54PM
(#10416346)
Slower to compile, but starting from a much faster starting point.
Re:First chapter of Kernighan and Donovan's new Go book [pdf]
by dekhn on Monday October 19, 2015 @09:42PM
(#10416954)
I'm not even aware of go compiling most of the time (it's typically under 1 second). go's build system handles these sort of things without a more complex workflow.
Re:First chapter of Kernighan and Donovan's new Go book [pdf]
by masklinn on Tuesday October 20, 2015 @02:53AM
(#10417801)
> I'm not even aware of go compiling most of the time (it's typically under 1 second).
That's besides the point, codegen from extra on-disk files can only be slower than codegen without extra on-disk files, so "generics are slow to compile" and "go has generate" don't make sense together, yet they are used together to assert that generics are bad and anyway go has a replacement.
> go's build system handles these sort of things without a more complex workflow.
No they don't. If you're using go generate you have to run go generate. That's a strictly more complex workflow than not having to run it.
Re:First chapter of Kernighan and Donovan's new Go book [pdf]
by dekhn on Tuesday October 20, 2015 @08:02AM
(#10418638)
I didn't say generics were bad. I said compilation is so fast that I didn't notice it.
While I agree that "strictly" your assessment is corect it's more complex, I think you're being a bit literal; it's just another command. most of my builds have hundreds of commands.