|
|
|
|
|
by arsv
4145 days ago
|
|
> Besides, bickering over the size of hello world is pretty pointless; better to compare the size of programs that actually do something. It is not about the size of hello world executable, that is just a symptom. A code smell if you like. There is something badly broken in the dead code (or dead data) elimination area. And I hope that code is in fact dead, because if it is not, add code generation to the list of smelly things. What I suspect I see here is a kind of C++ vtable problem built deep into the language design somewhere. And the reaction is, let's talk about large executables so that it would kinda become not so visible. Or maybe let's take a look at glibc, because glibc is definitely a paragon of clear design befitting a new language. > fmt.Print does use reflection There are two problems with this. The lesser one is why does it need reflection to print a string. The bigger one is why do I see about 600 reflect.* entries in the resulting ELF instead of a single one for the string type. |
|
There is definitely work that can be done to improve dead code elimination in the Go tool chain. The transition to Go will make this easier to achieve.
> What I suspect I see here is a kind of C++ vtable problem built deep into the language design somewhere.
Don't suspect. Dig into the problem and make some informed commentary. Idly speculating on HN is just spreading FUD, and benefits no-one.
You should read about Go's implementation of interfaces. It's not the same as C++'s vtable issue. http://research.swtch.com/interfaces