Skip to content

Comment on Execution in the Kingdom of Nouns (2006)parent

Comments

It's a mathematical formalism for minimizing the number of distinct entities in minimalistic theories of numbers, and providing definitions of "number" that are as well-defined as possible, which turns out to be harder than it appears at first blush. In practice, it isn't generally directly used, except in places where proper facilities for using integers haven't yet been created (C++ templates at a certain point, some older Haskell type code before ints become promotable to the type level, etc). (And just to be clear, I'm not saying they've never been used in real code, but that it's a serious code smell to need to use them in real code. They get inefficient, fast; given that they're often showing up in type checking algorithms they can get inefficient superlinearly in their size.)

I vaguely remember that church numerals (or was it some other encoding ?) have been used to minimize conditional jumps in code. If someone is familiar with how that works, would love to hear.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.