3 ms·
Correct bugs, logic errors I'm assuming, are a better problem to have than logic errors + undefined behavior in my opinion.
by codygman 13y ago
Correct bugs, logic errors I'm assuming, are a better problem to have than logic errors + undefined behavior in my opinion.
- agentultra 13y agoUndefined behavior is a perfectly acceptable abstraction [1]. The C specification is pretty clear on what it has purposefully left undefined which has made it rather resilient to changes in underlying hardware architectures. Must be why Haskell's run-time support is written in C [2] [1] http://thoughtmesh.net/publish/367.php http://thoughtmesh.net/publish/367.php [2] https://github.com/ghc/ghc/tree/master/rts https://github.com/ghc/ghc/tree/master/rts
- Peaker 13y agoUndefined behavior has advantages, of course. The C language is excellent at certain things, too. However, not every kernel driver and not every application needs the benefit of C or undefined behavior. The fact that Haskell's RTS is written in C is evidence that the kind of code in RTS's has more to gain from C than from Haskell. Some parts of drivers might also be best written in C.
- codygman 13y agoI will have to check that video out. I'm aware that Haskell's run-time support is written in C and I don't believe that is a mistake. Right tool for the job after all. For many use cases in my experience though, you don't want undefined behavior.