Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: false == 2 ??

From: joel:neely:fedex at: 1-Jul-2001 18:52

Hi, Graham, This is just one of those "stumbling blocks" where there's nothing to do but memorize the exception. Graham Chiu wrote:
> Okay, I see it. It's one of those forth methods to shorten > code - replacing logic with maths. > > But just wondering why false isn't 0 instead of 2! >
As you correctly pointed out, consistency in identifying FALSE with 0 would have created problems, due to the fact that The Powers That Be decided that series positions shall begin with one, rather than zero. In case anyone is tempted to claim that this is for the convenience of human beings, I'll point out that the first house on my block is number 1262, yet I've never heard anyone -- including children -- become confused over the equivalence of "first" and "number 1262". Most people of my acquaintance -- including non-geeks -- have no trouble distinguishing ordinal numbers (first, second, third, etc.) from cardinal numbers (0, 1, 2, ... 1262, 1268, 1274, etc.) I assume that the decision to have true before false in the behavior of PICK and / (as a path constructor) is by analogy with the behavior of EITHER or IF/ELSE which have the option for true before the option for false, so that if/else logic-expr true-block false-block or either logic-expr true-block false-block is essentially equivalent to do pick [true-block false-block] logic-expr (that is, without re-ordering the blocks). *sigh* I guess we'll take what consistency we can get! ;-) -jn- ------------------------------------------------------------ Programming languages: compact, powerful, simple ... Pick any two! joel'dot'neely'at'fedex'dot'com