← Back to context

Comment by auggierose

2 years ago

That book has its very own philosophy, in particular that "pointfree" (pointless?) programming is a good thing. No, it isn't.

You think it's not good because that's just your particular philosophy.

Pointfree programming allows for theory. It allows for algebraic composition of functions which in turn allows application of algebraic theory.

I mean in the end what is a computer program? A set of functions. Wouldn't you build a program by composing functions together to form bigger functions? It makes sense for this to be the fundamental theory of program organization.

Of course IO and mutation aren't initially included in this theory but that's a different aspect of the theory once you get more advanced.

So basically you're just saying something along the lines that in your opinion you don't like the theory of algebra or geometry or some such. It's not invalid, but like the philosophy book, just another opinionated take.

  • There is nothing wrong with functions. But forcing yourself to think exclusively in functions doesn't make much sense, and that is what pointfree is all about. It's basically a fetish. After all, functions have a domain, and the domain consists of objects that are often not functions.

    • Well once you introduce points into the theoretical world of functions, composition no longer fully works. It doesn't make sense.

      While a program in practice can have "points" an algebra of functions should be a theory like number theory. Number theory deals with numbers only, function theory deals with functions only.

      I'm not so strict on this in practice, the function must eventually be called and in the end the compositions converge into a point. But if you want to apply algebraic theory to the functions, they need to be point free.

      8 replies →