7 ms·
Haskell is a bad language, in my opinion, because you can't tell what the O(n) run-time is for any operation. Instead you just have to "trust" that it'll be fas
by xyzzy4 10y ago
Haskell is a bad language, in my opinion, because you can't tell what the O(n) run-time is for any operation. Instead you just have to "trust" that it'll be fast enough.
More on this: https://www.reddit.com/r/haskell/comments/1f48dc/what_does_the_haskell_runtime_look_like/ https://www.reddit.com/r/haskell/comments/1f48dc/what_does_t...
All of the answers seem insufficient. Basically you can't estimate Haskell run-time unless you are very familiar with the internal Haskell engine.
- willtim 10y agoThe complexity of many Haskell collection APIs is actually documented unlike with many other languages. These complexities are not changed by the runtime. Only constant factors and memory use are affected by optimisations and this is no different to any other high-level language that actually optimises code.
- deleted 10y ago[deleted]
- slezakattack 10y agoCompletely untrue. I'm not a Haskell evangelist (I appreciate it for what it is) but I thought I would at the very least point out that most of the documentation for basic data structures (i.e. Data.List[1]) not only are well-documented but have a link on the far-right side of the documentation site that directly shows you the source code and it's usually easy to tell what it's doing. Any developer should be able to grok that code and determine the run-time complexity. [1] https://hackage.haskell.org/package/base-4.9.1.0/docs/Data-List.html https://hackage.haskell.org/package/base-4.9.1.0/docs/Data-L...
- seagreen 10y agoI think he's talking about how it can be hard to tell what's already been evaluated and what hasn't.
- astrobe_ 10y agoI'm not a C evangelist, but I would point out that most documentation of standard C function is very detailed and its code is shown in its man page. Any developer should be able to grok that code and determine its safety. Mattaku...
- seagreen 10y agoAs a huge Haskell proponent: this is a totally legitimate question, sorry you're being downvoted. Writing extremely performant Haskell is a very specialized skill. Happily, Haskell is still extremely fast even without fine optimizations. It depends on what you want to do: if you're writing a moon lander and don't know anything about GHC internals you may be overreaching yourself=) But for most things like web apps etc. knowing the basics is enough.
- deleted 10y ago[deleted]