From: "David A. Black" Date: 2005-08-12T20:36:01+09:00 Subject: Re: NEWBIE QUESTION: pattern with nil On Fri, 12 Aug 2005, John Carter wrote: > On Fri, 12 Aug 2005, Austin Ziegler wrote: > >> Um. No wonder you're having problems, if you are trying to teach him >> things that aren't real. I'll be the first to admit that I'm weak, >> but I don't recall arithmetic or numerical theory being based on set >> theory (that is, numbers as sets). > > http://mathworld.wolfram.com/OrdinalNumber.html Nothing on that page remotely implies that the Ruby Integer object 3 is a collection of three 1 objects, as you have claimed. In fact, the elements of the ordinal number 3 are given clearly as {0,1,2}. But even that doesn't matter because Ruby Integers are not ordinal numbers in the first place. Ruby Integers are integers. The whole concept of ordinal numbers is explicitly and manifestly not about integers per se. As the page you cite says, "an ordinal number...is one of the numbers in Georg Cantor's extension of the whole numbers." Ruby Integers are not an extension of the whole numbers. They're integers. If you google for, say, "add two ordinals", or "negative ordinals", you'll start to see even more clearly how irrelevant all of this is to Integer objects. More informative and relevant would be: http://mathworld.wolfram.com/Integer.html[1] There's really no need to cast about for something other than integers for Ruby Integers to be like. If you want to write an OrdinalNumber class, you should. As far as I know there isn't one yet. David [1] Eric W. Weisstein. "Integer." From MathWorld--A Wolfram Web Resource. -- David A. Black dblack@wobblini.net