dope99
Re:Correctness – A paradigm for sustainable software development
on Friday April 05, 2019 @08:35PM (#19588381)
I’m not arguing here but honestly don’t know: how can interpretation be faster than the checking step of compilation? Maybe code generation takes more time, but Rust has ‘cargo check’ which only typechecks.
Parsing is basically a wash between compilation and interpretation. Dynamic types still need to be resolved for the tests to run. So why would interpretation be faster?
I’m working through a compiler book and would love to know.
Re:Correctness – A paradigm for sustainable software development
on Friday April 05, 2019 @07:39PM (#19588088)
Ah, so you are referring to Haskell.
Re:Correctness – A paradigm for sustainable software development
on Friday April 05, 2019 @07:38PM (#19588078)
I think most bugs are that kind that the compiler can catch. But yes absolutely a program can compile and be dead wrong. I’m writing a regex engine and lol at types saving me from all the mistakes I can make with building and transforming finite automata.
I’d still much rather have a slightly slow compilation than verify types in my head every time I’m in that area of code, or writing unit tests for every configuration of code which basically just validate I haven’t returned any nulls.
Typed compilation may take time, but it results in faster running programs. And unit tests also take time. I find the errors generated by a type checker come quicker and give more useful diagnostics for deep areas of the code.
Re:Lambda Cube
on Tuesday March 05, 2019 @11:54AM (#19311886)
Can you support when this trade off ought to go one way or the other with any objectivity?
Re:GCC proves an uninitialized variable must be 0 and doesn't warn abo...
on Tuesday March 05, 2019 @08:11AM (#19310260)
Just curious. I’m learning about compilers and would be interested in which compilers most make the trade-off in favor of optimal code generation over compilation speed.