4 ms·
> haskell is among the best of them There is little need for this kind of absolutism. Citing a haskell as one the best language in a contest where op ask abou
by soulbadguy 10y ago
> haskell is among the best of them
There is little need for this kind of absolutism.
Citing a haskell as one the best language in a contest where op ask about rust and c++ is dangerous.
To op : if your domain calls for modeling relatively 'type stable computation', and need strong correctness garanty, haskell is a great match.
- tinco 10y agoHow is it dangerous? Your qualifying remarks with regards to Haskell's domain make no sense. If you need a fast, compiled language with managed memory, high ease of development and a strong ecosystem then you can't go wrong with Haskell. 'Type stable computation' and a strong correctness guarantee are some added benefits of Haskell, though any strongly typed language (like for example Rust) will have these qualities. A nice benefit of Haskell that most other languages don't have is that it is explicit about side effects which gives you some extra confidence in the behaviors of your code. Related to this is its unusually powerful type system, which allows you to make some abstractions for generic code that are not possible in most other languages.
- karma_vaccum123 10y agoHaskell's runtime has one overriding attribute: laziness. If laziness is not desirable in your domain, Haskell is not a useful option
- tinco 10y agoCan you give me an example of a domain where laziness is not desirable? I only do Haskell for side projects, so perhaps I lack exposure to some domains.
- Terribledactyl 10y agoLaziness can make it hard or counterintuitive to determine the runtime properties of your program, especially with regards to memory. Same with real-time systems. But you can turn it off, or force evaluation if needed.
- knucklesandwich 10y agoFWIW, strictness may be introduced into haskell programs. Weak-head normal-form evaluation is builtin with the "seq" function and the "deepseq" library is commonly used for fully normal form evaluation of expressions. GHC 8 also introduces the Strict and StrictData pragmas[1] which allow you to make a module (or its types) fully strictly evaluated. [1]: https://ghc.haskell.org/trac/ghc/wiki/StrictPragma https://ghc.haskell.org/trac/ghc/wiki/StrictPragma