• expr@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    9 months ago

    As a professional Haskell developer, I tend to agree. I loathe any and all lens code I find using a ton of operators (though I just dislike lenses in general). Operators from base are generally fine, but for the rest, just use normal functions damnit. Operators suck for code navigation too.

    • baseless_discourse
      link
      fedilink
      arrow-up
      1
      ·
      9 months ago

      Yeah, it is one of the problem I have about Haskell.

      The other two are lazy evaluation makes print debugging almost impossible, you will need to print the entire environment to figure out where you are.

      Finally, I feel like List.fold, state monad, lens are basically just working with mutable structure with extra steps. Although this constructs prevent newbies who are not principled enough to effectively use mutable structure from using mutable structure, but it also doesn’t help experienced user to write more effective and clean code.

      Mutuabilty are certainly not harmless either. For example in ocaml, if you construct the IntSet type twice, they will be two completely different type. But this behavior can be pretty easily avoided by an experienced user.

      What do you feel about these features/shortcomings?