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

If you have function application, then you don't truly need a primitive conditional. You can represent Boolean values and conditional functions with the Church encoding [1]. This is how conditionals are represented in, for instance, the lambda calculus.

[1] http://en.wikipedia.org/wiki/Church_encoding#Church_booleans



Good point. But you need to have first class functions for that. This toy language does not. And converting from "this native number equals that native number" to your encoding of "true" is going to be an interesting trick.




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

Search: