4 ms·
It is not faster at compilation than Java, which was not particularly designed for such. Also, as can be seen, go is not a well-designed language, having langu
by kaba0 3y ago
It is not faster at compilation than Java, which was not particularly designed for such.
Also, as can be seen, go is not a well-designed language, having language warts we knew for 50 years. I would take the creators’ claims with a huge grain of salt.
- mariusor 3y ago[flagged]
- kaba0 3y agoSo which of my statements do you take issue with? I do think highly of Rob Pike and Ken Thompson for their IT work, but they are simply not good at language design, which just shows that PL design is quite unlike working on an OS.
- mariusor 3y agoBoth statements, because unless otherwise qualified you're comparing apples to oranges when you say Java compiles as fast as Go. There's always going to be more overhead on running the Java bytecode on the JVM than there will be when running the native instructions generated by a compiler (even as "unoptimized" as Go is). And someone that makes that assertion with a straight face without this caveat is not someone that should be dissing Rob Pike about language design.
- rayiner 3y agoBut Java is inspired by Smalltalk, which is a late-binding language that defers most things to runtime. I believe in Java you can generate bytecode directly as you’re parsing the source file.
- riku_iki 3y ago> It is not faster at compilation than Java why do you think so? Their goal was to be much faster, but I can't find much benchmarks..
- Mawr 3y agoJava is compiled to bytecode, for later compilation to machine code at runtime (JIT). Go is compiled AOT, straight to machine code. It makes no sense to compare them. Unless you meant that Java's AOT compilation is faster than Go's?
- kaba0 3y agoThe parent comment explicitly mentioned that Java is slow at compilation, which is just false. Also, there are single-pass compilers that produce machine code, they are not fundamentally slower than a byte code generator. Of course extensive optimizations will be more expensive.