• 0 Posts
  • 5 Comments
Joined 1 year ago
cake
Cake day: June 13th, 2023

help-circle
  • True. But the word Monad has done more harm to the accessibility, popularity and reputation of pure functional programming than pretty much anything else.

    Yeah, I could have said circle rather than curve of constant normal intersection points, but that word is very commonly understood, so it’s not that same as unnecessarily calling something a Monad. Maybe it’s the equivalent of calling it a 2-manifold instead of a wheel.

    Perhaps just ditch the generalisation, then, and just call them Result or Maybe. After all, circle is a short word, but we just call them wheels.


  • david@feddit.uktoProgrammer Humor@lemmy.ml*Permanently Deleted*
    link
    fedilink
    arrow-up
    8
    arrow-down
    1
    ·
    1 year ago

    Don’t call it a monad, call it a structured data type or something, that’s what it is! Calling it a monad is like saying that you’re using a curve of constant normal intersection point. Why not just say it’s a wheel?

    Yes, it’s mathematically true that you’re having a smooth ride precisely because the normals have a constant intersection point, but it’s also true to say that it’s a wheel and it goes round and isn’t bumpy and doesn’t scrape, and people can get a handle on that.

    So yeah, use a Result or Option or Maybe structured data type because it keeps explicit track of whether there’s a value or not, and yeah, you can change or combine them and preserve the tracking, but there’s no point calling it a monad unless you’re trying to make people believe that avoiding the $1bn mistake of allowing/using null requires category theory. It doesn’t, it’s just a structured data type. It’s simpler than an array! Stop calling it a monad.