Velocity Reviews > Ruby > Proposal for nil, 0, and "" in an if statement

Proposal for nil, 0, and "" in an if statement

Csaba Henk
Guest
Posts: n/a

 02-24-2005
On 2005-02-24, Martin DeMello <(E-Mail Removed)> wrote:
> Dave Burt <(E-Mail Removed)> wrote:
>>
>> Name suggestions (Thanks Roget):
>> #insignificant?
>> #paltry?
>> #petty?
>> #trivial?
>> #unsubstantial?
>> #negligible?
>> #base?
>> #void?
>> #plain?
>> #to_b

>
> #pseudonull?

+1 for #to_b !

That's the first one I could live with among the ones proposed.
And, as a pleasant side effect, then "to_b or not to_b" would become
valid Ruby. See illustration at

http://www.creo.hu/~csaba/ruby/

Csaba

Mathieu Bouchard
Guest
Posts: n/a

 02-26-2005

On Tue, 22 Feb 2005, Michael Neumann wrote:

> 100% agree. I especially cannot understand (at least mathematically) why
> 0 would be empty and 1 not.

In Cantor-style Set Theory, the Naturals usually get redefined in such a
way that 0 is equal to the empty set. Which means, incidentally, that 0
_is_ the empty set, and vice versa.

That definition is quite popular in Logic, but fails to draw much usage in
the rest of Mathematics. It's not the only definition either. Dedekind's
definition implies 0 is the set of all rationals lower than 0. Those
multiple defs can be thought of as different implementations, while the
usually-used interface consists of the operators +,-,*,/,etc.

In computer science, the first definition would be the most accepted of
the two, simply because the latter involves Real Numbers, which don't
exist in reality, by Skölem's Paradox. This may exclude the many lost
souls who don't get math, such Niklaus Wirth, who gave the name of Real to
a floating-point type (!!!) in PASCAL.

(If you think some programmers have bad naming skills when it comes to
writing their programs, find who called the Real Numbers "Real", when
almost all elements of that set don't exist.)

__________________________________________________ ___________________
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju

Csaba Henk
Guest
Posts: n/a

 02-27-2005
On 2005-02-26, Mathieu Bouchard <(E-Mail Removed)> wrote:
> In computer science, the first definition would be the most accepted of
> the two, simply because the latter involves Real Numbers, which don't
> exist in reality, by Skölem's Paradox. This may exclude the many lost
> souls who don't get math, such Niklaus Wirth, who gave the name of Real to
> a floating-point type (!!!) in PASCAL.

That guy who has a paradox, is simply Skolem, without the umlaut.

But, afaik, Skolem paradox is the phenomena that (provided set theory is
consistent) it has a countable model; on the other hand, set theory
knows of arbitrarily large cardinalities -- how can all that stuff fit
into a simple countable universe?

I wouldn't even call it a paradox: if you know the proper meaning of the
notions being involved, you'll see how it's possible. It just sounds
weird.

Comme ci, comme ca, how can you arrive to ontological claims from this
point? Speaking of existence is a marshy area in mathematics everywhere
beyond finiteness. In what sense does the set of all natural numbers
exist? From the consensual statement that 1, 2, 3, and so on, all exist,
you can't just jump there and claim, "there is a set of all natural
numbers". Similarly you can ask, in what sense do real numbers and their
set exist?

Note that again, existence of individual reals and their set is quite a
different problem. At least, the existence of their set. Denying the
latter doesn't imply denying the former. Intutively, a real number is
at about the same level of complexity as the set of natural numbers (as
a real between 0 and 1 can be specified by a set of natural numbers: the
indices where you have 1 in its binary representation; it's easy to
extend to all reals); but their set it at "one level higher".

All these considerations don't give an answer to the questions of
existence. In fact, what can answer to such a question is nothing but
your preconceptions And that's fine, they are just better kept far
from mathematics. Mathematicians don't need anything non-consensual
involved into the game. This is why you don't hear them speaking up in
such issues.

Csaba