4 ms·
> > 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. Ma
by cousin_it 10y ago
> > 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..."