3 ms·
> most languages' compilers aren't that fast All mainstream languages compile in about that ballpark, if not faster. I've always found it odd that one of the
by laureny 14y ago
> most languages' compilers aren't that fast
All mainstream languages compile in about that ballpark, if not faster.
I've always found it odd that one of the driving design principles of Go was "fast compilation". It's always struck me as odd and short-sighted, obviously motivated by the Go authors' history with C++. If only they had spent some more time studying other languages, they would have realized that compilation times are really not a concern in languages these days, and they might also have designed Go with more modern features in mind, such as exceptions and generics.
- DeepDuh 14y agoNot really a concern? I don't agree. Look at large C++ projects, and let's not speak about GPU frameworks like CUDA, OpenCL and OpenACC. If it weren't be a concern, software companies wouldn't invest in clusters just for compilation.
- laureny 14y agoDidn't I just single out C++ as the only mainstream language being slow to compile?
- RobotCaleb 14y agoApparently you're stuck in a world where nobody around you uses C++. I hate to be the one to break the news to you...
- laureny 14y agoDidn't I just call C++ "mainstream"?
- pjmlp 14y agoContrary to what many young developers may think, C and C++ aren't the only languages with compilation to native code. Already in 1987 Turbo Pascal 4.0 was compiling quite fast, Borland states around 34,000 lines/minute for the 5.5 version in 1989. Similar compilation speeds are possible for languages with modules, since the early 80's. Go's compilation speed is only news for someone that never used a module based language for systems programming like Modula-2 or Turbo Pascal, just to name two.
- stesch 14y agoIt doesn't matter if somebody knows Turbo Pascal 4.0 or Modula 2 if you can't use it. We are repeating history because the old ways were forgotten or replaced.
- ufo 14y agoWhat he was trying to say is that you shouldn't "design for fast compilation". You should design the language to allow modularity and fast compilation will naturally follow.
- pjmlp 14y ago> It doesn't matter if somebody knows Turbo Pascal 4.0 or Modula 2 if you can't use it. Some Modula-2 compilers: http://www.modula2.org/adwm2/ http://www.modula2.org/adwm2/ http://plas.fit.qut.edu.au/gpm/ http://plas.fit.qut.edu.au/gpm/ http://www.modulaware.com/ http://www.modulaware.com/ http://www.excelsior-usa.com/xdsx86.html http://www.excelsior-usa.com/xdsx86.html Modern Turbo Pascal compatible compilers: http://www.freepascal.org/ http://www.freepascal.org/ http://www.mikroe.com/mikropascal/avr/ http://www.mikroe.com/mikropascal/avr/ http://turbopascal.org/ http://turbopascal.org/ http://www.embarcadero.com/products/delphi http://www.embarcadero.com/products/delphi It is just a matter to look for them.
- jsmeaton 14y agoActually, compile time was a huge factor during the design of Go, due to the massive code bases at Google. See http://talks.golang.org/2012/splash.article http://talks.golang.org/2012/splash.article for discussion on the import/compile system.
- jff 14y agoAt the kind of project sizes you see at Google, you start to measure compilation time in tens of minutes. If you have a source control system that triggers an automatic build every time you upload a change for review, can you see how waiting 45 minutes (a number I got from a current Googler) to compile and verify that your change doesn't break the build might just be an inspiration to put a focus on compilation speed? Also, when you code with generics, you're coding with Hitler.