4 ms·
> build/run cycle > non-compiled language C isn't trying to fit in that space. regardless, C code takes far less time to parse, optimise, and convert into mac
by foxhill 12y ago
> build/run cycle
> non-compiled language
C isn't trying to fit in that space. regardless, C code takes far less time to parse, optimise, and convert into machine code than all the languages i know of.
- astrodust 12y agoNope. Pascal is still king here. The speed it compiles at is simply ridiculous. Largely this is because the way the modules are defined makes it a snap to pre-compile aggressively. You're simply not allowed to do things that would change the way a module is understood by the compiler based on context. The biggest hold-up in the C world is rampant abuse of #include files.
- sika_grr 12y agoYea, change a certain .h file and you can go get a cup of coffee while waiting for the build to end. This can't ever happen with Java/C#.
- foxhill 12y ago> The biggest hold-up in the C world is rampant abuse of #include files. true. > Nope. Pascal is still king here. for some values of "king" perhaps - perhaps it's faster to compile, but no arrays of varying lengths in a function call? and if i'm not mistake, a function must be defined before use..? pascal is incredibly restrictive, and perhaps that's why it's so fast.
- astrodust 12y agoIt's very restrictive, but the compiler is unbelievably fast because of that. I'm not going to argue that Pascal is somehow superior to C, it's far more limited, but there's lessons here to be learned on how to make a compiler rip through code.
- Dewie 12y ago> for some values of "king" perhaps - perhaps it's faster to compile, but no arrays of varying ... Well, let's not change the goalpost - your initial assertion was that C has faster compile times. Then chances are that something's got to give, whether that is in the grammar, declaration order, etc.
- pjmlp 12y agoOnly if speaking of original Pascal, neither Extended Pascal nor Object Pascal suffer from those limitations. When I learned C, after a few years of Pascal dialects C just felt like a stone age language.
- nl 12y agoTurbo Pascal is (was?) king here. It's possible to make slow Pascal compilers. But Borland put a lot of effort into that, and it really set a very high standard.
- codygman 12y agoDoesn't Forth compile incredibly fast?