Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, you can do all of that. But normally, you can (in fact, have to) chose a much more pragmatic computing substrate instead of graph-rewriting, so unless you're trying to poke at the theoretical limits of what is computability, it's mostly a party trick, and not even a very amusing one unless you attend a very peculiar kind of party.

And also; numbers. I would be impressed if you at least used two-complement integers, and decently effective destructors for your data structures.



The basis of the current implementation of Haskell in GHC is the "spineless tagless G-machine", which is a combinator-graph-reduction machine. It does implement numerals as primitives rather than making them out of functions.

Not only have combinator-graph-reduction machines been used as a target for compilation for pure functional languages, they have been both implemented in hardware and in software. Once you introduce the B, B*, C, and Y combinators as primitives, you can get reasonably efficient compiled programs. The pure combinator-graph-reduction approach isn't currently in fashion; https://dl.acm.org/doi/pdf/10.1145/62678.62716 is a paper by A. C. Norman from 01988 discussing the reasons why it largely fell from grace. Koopman did his dissertation on such a machine around the same time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: