4 ms·
FWIW this is the same with Turbo Pascal's (and modern incarnations of it, like Delphi and Free Pascal). If you modify a constant in a unit, the compiler will re
by badsectoracula 10y ago
FWIW this is the same with Turbo Pascal's (and modern incarnations of it, like Delphi and Free Pascal). If you modify a constant in a unit, the compiler will recompile all other units that use that unit. The only way to avoid that is to keep everything in memory and do background updates to the AST. At which point you might as well do background compilations anyway.
- kqr 10y agoPascal, Delphi and Ada are a lot better than C and C++ in that regard, though, by virtue of actually having some sort of sensible module system.
- pjmlp 10y agoNot really, C++ build times are usually measured in hours for anything worthwhile using, e.g. Cocos2d-x as a possible example. You wouldn't get such compilation windows with Pascal derived languages using their module systems. The proof being that with VC++2017 using the incremental linker and C++ experimental modules, one also gets more human friendly compilation times. https://blogs.msdn.microsoft.com/vcblog/2016/10/05/faster-c-build-cycle-in-vs-15-with-debugfastlink/ https://blogs.msdn.microsoft.com/vcblog/2016/10/05/faster-c-... The Microsoft blog is only about the incremental linker, modules would speed it up even more.
- badsectoracula 10y agoI was referring to the given example, i actually use Free Pascal and Lazarus for my own tools and a big reason is how fast both the IDE (Lazarus) and the compiler (Free Pascal) are compared to anything C++ (well, anything except Borland C++ 5 i mentioned above and C++ Builder, but that isn't exactly fair considering the age of those programs :-P). But even in Turbo/Borland/Free Pascal modifying a unit means that you have to recompile the other units that need that unit.
- pjmlp 10y agoAh, ok. Actually I find those cascading of build dependencies quite productive. Sometimes I wonder if Pascal variants had gotten more love from gamedevs (TP was my Unity), if they would be always coming up with tricks to speed up their build times or force reloading of C++ code.
- badsectoracula 10y agoI think Pascal didn't got much love from gamedevs for more or less the same reason it didn't got much love from everyone else - there was only a single company with a popular Pascal compiler (Borland) and that self-imploded by trying to chase after enterprise markets while ignoring the masses of developers that made them popular in the first place. For the entirety of the 90s, people who wanted to write Pascal on a mainstream platform (ie. DOS and Windows) had very limited options. Official SDKs and OS APIs written in C didn't help either too, although that was a minor issue. But still created friction. Of course with Free Pascal that isn't the case anymore, FPC is the compiler with the second number of supported platforms (after GCC) and architectures, but the stigma and public perception of the language still prevails (for example many things that people laud D and Rust for are things that Free Pascal did for years).
- pjmlp 10y agoPretty much my opinion as well.