Comment

Comment by mathisfun123

As someone that knows enough cat theory and fp to scoff at most formal presentations (including all of the famous hypebeast ones hn loves to recommend), I have to say bravo to that guy (person) for doing something I've thought of doing many times (and doing it very well!).

My strongly held belief is that FP/category theory is a language game (in the wittgenstein sense) played for its own sake.

If you don't know fp and you're curious/impressed by all the jargon and I told you functor/monad/applicative is all just a means to runtime operator overloading would you still be as impressed?

And if you do know fp and I say the same to you, if your response is I'm wrong, can you please give me a concrete example for something that Applicative (or one of those other things) can do that runtime operator overloading can't? And don't allude to purity or laziness because those are orthogonal. Here I'm talking about specifically what `lift` and `bind` enable you to compute. Further preempting the very common responses: equational reasoning is an artifact of the type system that enforces various "contracts". You can enforce the same contracts in whatever imperative language (at runtime, at compile time, whatever).

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton