by etse · 6y ago · 0 comments
I’m not knowledgeable enough to read between the lines, but is this a veiled reference to Go? If so, what about Go is intentionally not smart, and why? (Or language X)
See Rob Pike’s 2012 talk “Go at Google: Language Design in the Service of Software Engineering”
video + slides: https://www.infoq.com/presentations/Go-Google/
transcript: https://talks.golang.org/2012/splash.article#TOC_5.
Some of the things it calls out:
- unused dependencies are a compile-time error
- dependency graph has no cycles
- importing a package only looks at object files, not source files, so template/macro stuff is generally out
- declaration order is reverse from that of C so that parsing code is faster and easierI had a test suite that used `StringSpec` to make tests prettier to write, but after a few hundreds of those, my Kotlin tests started taking visibly longer to compile than the Java source code (which was much larger)! So I had to re-write the tests to use plain Kotlin functions instead.
All languages I know that have "advanced features" have notably slow compilers: Rust, Scala, Haskell. I would be happy to know if there's any counter-examples (I might almost include Kotlin as a counter-example, actually, as it's not so bad if you let it run the Gradle daemon to use the techniques mentioned in the article - but that feels a little bit like cheating as you're getting fast by just avoiding compiling everything).
So while I think the trade-off is worth it most of the time, it's something to be aware of and consider in your decision when choosing a language.
The go language doesn't have either if those things, so the compiler has less work to do per line of code. But it seems like you knew that? You're the one that brought up Go.
[1]: https://lemire.me/blog/2020/06/04/the-go-compiler-needs-to-b...