|
|
|
|
|
by kqr
3838 days ago
|
|
> Haskell is too safe. It forbids you from doing too many things that the computer can do. Computers are to computing science what telescopes are to astronomy, or something. Haskell is a great language for expressing computations, the thing CS is about. It's not meant to flip bits and observe processor states and page faults, if that is your idea of fun. That's more computer engineering stuff. But Haskell is absolutely capable of drawing pretty circles on the screen in just a couple of lines of code![1] [1]: https://hackage.haskell.org/package/gloss-1.9.4.1/docs/Graph... |
|
I think Haskell is good at expressing a narrow range of ideas that, honestly, aren't all that fruitful outside the FP field. There are three main reasons why it's not a great language for expressing arbitrary algorithms:
1) It uses the pointer model instead of the integer RAM model. That leads to extra logarithmic factors.
2) Immutability. That's hypothesized to also cause extra logarithmic factors, but AFAIK that's still an open problem.
3) Non-strict evaluation. That wreaks havoc with space complexity, and compositional analysis of performance in general.
Yes, you can add epicycles to remedy these drawbacks (arrays, ST, strictness annotations). But I'd rather use a C-like language in the first place. That's closer to the "core" of CS as I understand it, and that's how most algorithm research is done.