3 ms·
>sacrifice the abilitity to write print statements to do debugging No. >lose the ability to reason about order of execution No. >But does it really result i
by imanaccount247 12y ago
>sacrifice the abilitity to write print statements to do debugging
No.
>lose the ability to reason about order of execution
No.
>But does it really result in more performant code?
That is not the goal. The goal is being able to reason about the code, and write code that is correct. The fact that it performs very well is due to a high quality compiler, not purity.
> Every benchmark I've ever seen, more practical languages like Ocaml have come out on top.
Doesn't look that way from here: http://benchmarksgame.alioth.debian.org/u32/ocaml.php http://benchmarksgame.alioth.debian.org/u32/ocaml.php
How exactly is a language that is unable to handle parallelism "more practical" than one that handles it better than virtually any other language?
- methodology 12y agoOCaml is more practical than ML and Haskell because it has objects, for loops, more edge cases in the language, built in mutable keyword, and extensible records.
- imanaccount247 12y agoNo it is not. Ocaml's objects make it less practical, not more. That is why they are virtually completely unused. At best, for loops are irrelevant. I'd say they are closer to a negative than irrelevant though. What do you mean "more edge cases?" That the language is less safe? How is that practical? Haskell has mutable references too, with the added benefit of them being type safe. And haskell has extensible records, they are just a library like anything else: http://hackage.haskell.org/package/vinyl http://hackage.haskell.org/package/vinyl
- methodology 12y ago> That the language is less safe? Not necessarily. > And haskell has extensible records, they are just a library like anything else: And OCaml has monads, they are just a library like else.
- dllthomas 12y agoMonads are arguably a library in Haskell, too... though one the standard guarantees is present, exposed by the Prelude, and relied on by a lot of code.
- imanaccount247 12y ago>Not necessarily. Then what? You made the vague statement, make it not vague. >And OCaml has monads, they are just a library like else. And? I did not claim ocaml lacks monads. You claimed haskell lacks extensible records. You do understand that my post was a direct reply to what you said right? Not just some random things I felt like saying for no particular reason.