5 ms·
As I compare Rust and Go, the one thing that keeps me indecisive is that the Rust compiler is slower. Was that ever an issue for you?
by hathawsh 8y ago
As I compare Rust and Go, the one thing that keeps me indecisive is that the Rust compiler is slower. Was that ever an issue for you?
- RReverser 8y agoIt's not a big issue when you're working on the code continuously, thanks to the incremental compilation, but in general I'd always take slower compilation with more analysis (== lower risk of crashes and faster runtime) over faster compilation any time.
- Thaxll 8y agoDepends, I work on large C++ code base, compile times are really hurting productivity.
- IWeldMelons 8y agoYou may try precompiled headers
- stouset 8y agoIt's important to keep in mind that there is always going to be a bottleneck on productivity. Sometimes that bottleneck is compilation speed, sometimes it's the language allowing unbounded growth in complexity, sometimes it's ecosystem immaturity, sometimes it's fixing bugs another language would have avoided, and sometimes it's a language's lack of expressivity. But there's always something. It's worth keeping in mind that in some other language or with some other library or using some other toolkit, you'll still wind up with a bottleneck. It'll just be a different one (and maybe a worse one).
- saghm 8y agoDoes C++ have a "lower risk of crashes" as GP said though?
- freedomben 8y agoWhen I worked on a large C++/Qt code base compile times were awful. We ended up setting up distcc and that helped immensely. Worth looking into.
- pjmlp 8y agoRight now Rust compile times are still slower than C++, when doing "make all", as everything is always compiled from scratch and crate binaries aren't shared across projects. Delphi/Ada/D/.NET Native like compile times are still on the horizon.
- chris_st 8y agoMany years ago, I switched from working on a C++ project to one using Java. I was amazed how fast the Java compiled! The downside: I used to use the "waiting for the compiler" time to think about what I'd written, consider alternatives, think about refactoring, etc. Suddenly I had to block out time for that :-)
- malkia 8y agoMy "gentle" java introduction came by using GWT (java -> javascript). Also we had just one module, so it took quite a long time tom compile :) At least most of the unit tests were run under java - e.g. the "business" (ui) logic.
- sitkack 8y agoIn seriousness, maybe part of the power of C++ is how it forces the programmer to slow down, be more methodical and concentrate more. A language that is faster and looser, could also burn out the programmer faster and encourage shallower thought patterns. I know that when I am trying to find a bug (any bug, it could be logical or data) that I am slowing down a simulation of the interaction of components in my head. This helps one understand all of the abstractions and evolutions of processes within the program. Maybe that very act is the power of C++.