Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've personally been watching Rust from the sidelines. I am still waiting for a language to tackle excessive compile and link times.


Nim compiles to C, so can at least make use of fast C compilers. But the solution really seems to be to just use a fully dynamic language like Common Lisp that can compile, load, and redefine (hotswap) everything incrementally so you're not having to start from nothing all the time.


Compiling to C is not a compile performance advantage. If anything it slows you down as described in the article (header files). It's just not as bad as C++.


I've not used it for anything too big, but D compiles incredibly fast.


On big projects, linking times are really the bottleneck.

Sure, incremental linkers exist [1], but all of them tend to do O(n) work on every invocation. Source control software, even developed explicitly to scale [2], behaves the same way. Makefiles as well; Tup [3] tries to solve this, in vain since the linking step is still holding everything up. There is so much inherent inability to scale built into our tools. So on big projects everything grinds to a halt as you cannot buy enough developers and hardware to keep up with O(n^2) forever.

[1] MSVC cl, GNU gold

[2] git: http://lkml.iu.edu/hypermail/linux/kernel/0504.0/2022.html

[3] tup: http://gittup.org/tup/manual.html


This can be solved by putting individual components into shared libraries.


But then you pay the cost every single time on startup, unless your components barely interact.


Recent article regarding D compile times: https://blog.thecybershadow.net/2018/11/18/d-compilation-is-...


It is very fast for certain projects, but link times on some can make up for that. I have a toy program using vibe.d that takes around 1s to compile and 10s to link. I could probably make that faster by switching to gold, but I didn't yet.


I'm not sure how anything over 100ms could be considered "fast compile" for a toy program... Basically Pascal, or simple c compilers like tcc should be the benchmark imnho.

That's not to say I don't allow for trade-offs.. I gladly trade some milliseconds (or, grudgingly seconds) for features.


Most of the compile time of that particular program is spent parsing HTML templates and converting them to D code. This is all done by D code provided by a library that runs at compile time as part of a template function instantiation in my code. So the compile time is inflated a bit in this case.


Object Pascal? I guess Ada also has pretty good compile times - but I'm not sure if the Pascal heritage stretches to modules/compilation.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: