Hacker News new | ask | show | jobs
by agnishom 348 days ago
I understand where you are coming from, but in a large number of cases this advice does not really make sense.

Sure, a Haskell programmer does write toList when relevant. The lens library also has operators named each or over or _Left.

But let's say I write <$> and you tell me to use fmap. Is that any better? Not particularly. If you didn't know what Functor is, you wouldn't automatically be able to infer it by reading the name `fmap`.

A large number of Haskell concepts simply have no analogue in everyday English.

1 comments

Read more carefully. My advice is to ditch operators in the lens package. I didn't tell anyone to ditch operators in Prelude including <$>.
My bad.

But I think my point still stands? What is the 'normal' way to write ^. for example?

The non-operator way to write ^. is the named function called view. https://hackage-content.haskell.org/package/lens-5.3.5/docs/...
Thanks. Perhaps you have a point