3 ms·
Could someone explain this to me? If, as they say, "There is only one language construct in π: the pattern", why is there flow control, blocks, etc.? Wouldn't i
by teilo 17y ago
Could someone explain this to me? If, as they say, "There is only one language construct in π: the pattern", why is there flow control, blocks, etc.? Wouldn't it be more accurate to say that a pattern is a specialized function, and the only type of function in π?
- ggchappell 17y agoI don't understand it, either, but I'll make a guess. It appears that, from a "C"-programmer point of view, π is something like a type-aware preprocessor. So, for example, the integer_potentiation snippet is using π to construct a "C" program. OTOH, I may be completely wrong. (Actually, this isn't too surprising, considering the references to "OOPSLA" and "patterns" all over the place on that page. In my experience, people who hang out at OOPSLA often come up with some interesting stuff, but don't do so well at explaining it to outsiders, this page being yet another example of this phenomenon. <grumble, grumble>.)