| As a professional programmer with a strong interest in functional programming, but none of the formal background, I should be the perfect reader for this article. Unfortunately, I found it to be a complete syntactic and semantic mess. I'll enumerate a few of the problems that tripped me up as I read: * The underlying metaphor is poorly explained. E.g. The identity bird: "when you call out a bird to it it simply calls that bird back to you". The notion of "calling out a bird" is awkward and confusing. On first reading, it seems to imply that one calls out the name of a bird, which is simply wrong. I understand that birds represent higher-order functions, but if I didn't, I would never grasp it from reading this article. (I doubt that Smullyan was this sloppy in his original description of the metaphor.) * The mockingbird "duplicates its input". No, it doesn't. It applies its input to itself, which is totally different from duplicating it. The next sentence is also confusing at best: "If you call some bird x to the mockingbird it will call back as if the bird x had called out to itself". The phrase "as if" is wrong and misleading, and bird x is not calling out some unspecified value to itself. A better description is that the mockingbird function calls out bird x to bird x. That's a huge difference. * I had to read this phrase about five times before I could parse it: "The mental giants who computed before computers spoke to this magical bird chiefly for this purpose". And once parsed and understood, it still fails to explain why we're suddenly talking about factorials instead of birds. What makes this bird metaphorically "mechanical" or "foreign" is mysterious. It just does factorials somehow because it doesn't "follow the rules of regular combinator birds but it will follow some". Come again? * The next sentence is where I started to give up: "Initially we call the strange factorial out to the mockingbird, which calls back the same thing as calling the strange bird to itself". Is the "fact" variable supposed to be the strange factorial? What is the strange bird? None of this terminology actually appears in the function that is supposedly being explained here. I had to ignore the text and work out the purpose of the function myself. I'm sure there's value in this metaphor - I love the other Smullyan books that I've read and have a lot of respect for his careful puzzle-making. But I'm afraid this article doesn't do him justice as written. |
I want to make the idea simple to parse by breaking it down into it's pieces, if it's noticeably hard to swallow (or as you said the commentary actually detracts from my code examples) then I did it wrong!
Edit: I changed some terminology and clarified the points you mentioned, hope this helps anyone who reads this in the future, thanks again for taking the time to leave feedback :)