Re:Why Functional Programming Matters (1984) [pdf]
by cousin_it on Friday December 09, 2016 @02:59AM
(#13137391)
> > how do the amount of leaky abstractions compare in Haskell to other languages?
> I don't think Haskell is worse than any other language in that regard.
Many Haskellers are happy about this kind of stuff:
min = head . sort
which is the very definition of a leaky abstraction. The blame lies with laziness, because it allows code to depend on implementation details of other code in crazy ways: "sort is O(n log n) unless you ask for only the first element, in which case it's O(n). What if you ask for the last element? Uhhh..."
> I don't think Haskell is worse than any other language in that regard.
Many Haskellers are happy about this kind of stuff:
which is the very definition of a leaky abstraction. The blame lies with laziness, because it allows code to depend on implementation details of other code in crazy ways: "sort is O(n log n) unless you ask for only the first element, in which case it's O(n). What if you ask for the last element? Uhhh..."