News for hackers. Stuff that matters.
Re:PostgREST – A fully RESTful API from any existing Postgre... by drdaeman on Sunday March 26, 2017 @09:17AM (#13960627)
I know some Haskell, but don't find code like this to be very readable:

    offsetParams :: M.HashMap ByteString NonnegRange
    offsetParams = M.fromList [(toS (replaceLast "limit" k), fromMaybe allRange (rangeGeq <$> (readMaybe =<< (toS <$> v)))) | (k,v) <- qParams, isJust v, endingIn ["offset"] k]
Not because it's something I don't understand at the concept level (there isn't anything complicated there), but because of the formatting and general lack of comments.

Maybe I'm talking about bike shed color, but it could be much better just by having some extra newlines that separate the pieces of list comprehension expression.

There are no comments on this comment yet.