What is a good function?

Joseph Goguen’s paper “An Introduction to Algebraic Semiotics, with Application to User Interface Design” gives an interesting (and idiosyncratic) perspective on this, using simple examples like a UI for a clock or a line-oriented text editor.

I’d expect there are common examples you see of this all the time in the wild. Very mundane examples include ^, &&, ||, +, and *, which are all very good functions, in my book, and gain much for their goodness from being operators in their respective monoids. Of course, any library that exposes a monadic API (like Lwt or Async) or an applicative interface (like Cmdliner) is also leveraging this kind of approach.

That’s a good point. I should have just said this outright, but I phrased my comment carefully to say that operators in a good algebra are good functions, but not to claim that only those functions are good ones :slight_smile: I certainly wouldn’t argue that helper functions are bad!