by carapace · 7y ago · 0 comments
> FP reflects an algebra of programs, not traditional functional programming. It doesn't suffer from these problems that the author is stating.
You're so right. (Not about Conal Elliot not having grokked the paper though, see below.) The Joy programming language is much closer to Backus' FP than Haskell, for example, and working with it is much more like deriving mathematical equations than any other language I've tried (FWIW.) (Some examples here: http://joypy.osdn.io/notebooks/index.html)
He's very much on the right track though!
http://conal.net/papers/compiling-to-categories/
Here he's converting Haskell code to a point-free style that is very similar to Joy, then instantiating the code over different Categories to get multiple actual programs/outputs from a single expression: "a variety of interpretations including hardware circuits, automatic differentiation, incremental computation, and interval analysis."
I'm really starting to enjoy Joy, J, FP, and other languages based on a similar combinator-like basis. I'll have to read over Compiling to Categories, because that certainly is something that catches my eye.
I have a hunch that the Categorical programming paradigm will prove to be really cool. I hope it doesn't take decades to get into common use, eh?
You might also like this version of Joy implemented in Prolog: https://osdn.net/projects/joypy/scm/hg/Joypy/blobs/tip/thun/...
Check out the "compiler" at the bottom.