Summary
Publication of examples in any language of the type representing integers, without the direct use of machine integers. Include mappings in and out of the user type. Points for efficiency in space and / or time.
Original question
In the comments, some rather bold answer to the question about object-oriented programming, I stated my belief that machine primitives are not objects, but could not really confirm this statement in the same way as the poster of this answer could not substantiate my claims about universality and the fundamental nature of object-oriented philosophy.
So that made me think. In C ++, a language in which machine primitives do not participate in the class hierarchy, you can determine the type of object: mdash, say, Integer & mdash, which does not use the machine primitive to store its value?
There is this beautiful bit of a pattern hacker that implements church numbers. Unfortunately, since conversions between integers and Church numbers occur strictly during compilation, there is no way to get around using machine integers, for example, for user input.
So, what I'm looking for is the equivalent of the above, although not necessarily using numerals, with reasonable space requirements that can be implemented in a language such as C ++, without functions of a higher order. I would like to see examples in other languages, especially those that use interesting dynamic typing tricks. Pointers and function pointers are not considered primitives, as long as the stored address is used strictly as such, and not its integral value.
Bonus points for placing all integers (i.e., not only integers), and bonus points for developing a system in which floating point numbers can also be implemented.
To avoid troubles in the queue and encourage a polite discussion, I have been doing this with the wiki community question from the very beginning.