3 ms·
There may be other languages that have taken a similar approach—I’m not up to speed on that—but simplifying elements of the language design to enable fast compi
by antimetropic 6y ago
There may be other languages that have taken a similar approach—I’m not up to speed on that—but simplifying elements of the language design to enable fast compilation was definitely a conscious design choice for Go.
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/ https://www.infoq.com/presentations/Go-Google/
transcript: https://talks.golang.org/2012/splash.article#TOC_5 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 easier