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

[REBOL] Re: R: Re: Correct Behaviour? Was False = 2 ????

From: jelinem1:nationwide at: 3-Jul-2001 10:07

<grabs the bloodied death-club and takes his turn again, beating the dead horse's carcass> Maybe this is not really "flogging the dead horse" (yet?), but I always find it interesting when there are so many passionate (and very well-articulated) arguments on such a "minor" topic. I'll throw in some final replies, then let the chips fall where they may. Feel free to ignore any comments which do not make sense.
> Regarding the numeric values of logic values, I do not care for the
values, but if I should decide I would choose zero for 'NULL. postive values for true and negative for false. What I've actually done in the past (that darn C language again) is: 0 for FALSE, -1 for TRUE, and -2 for ERROR (pretty much used as "none" in REBOL, before the existance of REBOL). The 0 and -1 were for compatability of binary operations; I never performed arithmetic on or assumed a particular value for ERROR.
> For me the issue is *not* The Language That Must Not Be Named, but
rather simplicity, consistency, models, and Mathematics. Mathematics is included in programming to be sure, but I don't see Mathematics as a superset of programming. Just as "art" can be described in the terms of physics, all of programming can be described in the terms of boolean logic (ie mathematics), but IMO there is more to programming than this. So, I do not see any reason to choose programming implementations based on mathematics (probably better stated as numerics ).
> I think it was Volker who said "Plain English for Computers." Well as
somebody who speaks english / scots as my natural language "plain" is hardly a term I would describe for the language. I've heard this observation of the that phrase before. You are attempting to interpret the phrase literally, in the context of other languages; it wasn't meant to be interpreted that way. You are correct, English is a messy language (just ask Larry Wall), but you are missing the intent of the phrase. "Plain English" to me means "intuitively understood". Now don't go telling me how people's intuitive understandings differ (esp among cultures) ;)
> Logic values do have an implicit integer meaning, 0 false, and 1 true.
This is firmly accepted amongst electronics world. Absolutely! This makes great sense in the world of electronics. But why, in the abstract world of logic, should this relation be valid?
>> Zero is the OFFSET... > Absolutely! My followup question would be... What number other than
zero could you rationally choose to represent the offset of the first book? I would say there is none, regardless of the fact that there is nothing preventing you from choosing any other number. To restate from my first post on the topic, we are talking about two different means of accessing list elements. The OFFSET, or INDEX, properly (ie mathematically?) begins with zero. The POSITION, or COUNT begins at one. Then the argument becomes: do we want to reference list items by INDEX or POSITION? Are we mathematicians (INDEX) or, um, not (POSITION)? After programming in C for a decade myself, I STILL had to mentally coerce myself into remembering "array starts at zero, loop until less-than the length...". This came from firm roots in BASIC as a first language. I eventually came up with the terminological distinction of index vs position, and found it very helpful in keeping things straight. I find it very welcome to "come home again" to position-based access. <passes the club, goes back to work> - Michael