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

[REBOL] Correct Behaviour? R.I.P.

From: joel:neely:fedex at: 5-Jul-2001 17:20

Hi, again, Jeff, Jeff Kreis wrote:
> > NASA does, in fact, "count down" to zero. That's the point > > at which lauch occurs. > > They say "lift off" not zero, aye? > > "3 .. 2 .. 1 .. lift off!" >
Right. Because they're naming the interesting thing that happens *at* time t = 0 ...
> not > "3 .. 2.. 1... 0... lift off!" >
... because that would place the time of "lift off" *at* t = +1 (one second too late).
> Rock and Roll is definitely one base indexed. >
I find the present state of this thread highly ironic. I don't believe I've ever denied that there are some applications which are naturally and simply one-based (and if I have done so, or left that impression, I categorically retract and apologize). There certainly are. But there are *also* many (non-"system") situations for which zero is a natural basis. If a particular language does not support that capability, it makes writing programs for those situations more complicated (or at least, cluttered) than would be the case otherwise. I offered several examples of such cases without receiving any meaningful replise. I'm still interested in ideas anyone may have to offer regarding effective work- arounds in such situations. We should admit that "array" is a low-level concept. Higher- level data structures allow the programmer to connect "keys" (of any type) with their associated values (also of any type). The main reasons we programmers attach special significance to arrays are: 1) Historical -- low-level languages came first, before we knew how to do better, and 2) Performance -- a consecutive range of integers (regardless of base point) can be used to perform "direct access" to a specified region of memory, requiring less time than searching a collection of keys of arbitrary data type. Since the choice of base point is actually arbitrary, it seems fair to discuss: * the relative merits and pros/cons of the choice, * how to work around the constraints imposed by any particular choice, and * whether one alternative has more flexibility, and offers simpler expressions for a wide range of tasks, than some of the others. Other reasons to ask "Why...?" are: * there are sometimes reasons for design choices that are not obvious on the surface, and * sometimes understanding the reason for a design decision helps one use a feature more effectively. Learning a new skill means that one actually has to be willing to learn something one does not already know. This especially applies to programming, which requires a degree of precision not commonly required in other human activities. REBOL, like any other programming language, contains concepts and distinctions that are outside the everyday thought habits of John Q. Public. John Q. thinks that computers can do arithmetic. When he evaluates 5280 * 12 to tell his inquisitive daughter how many inches are in a mile, it obligingly tells him 63360 as an answer. But when he tries to evaluate the expression 186282 * 60 * 60 * 24 * 365 to tell the same child how many miles are in a light year, he gets ** Math Error: Math or number overflow ** Where: halt-view ** Near: 186282 * 60 * 60 Poor John Q. is forced to confront the difference between integers and floating-point numbers, which he probably never had to think about before. John Q. has been typing since high school, and thinks that an uppercase "A" is just an uppercase "A". Then he hits upon the fact that #"A" = "A" is false! Poor John Q. is forced to confront the difference between characters and strings, which he probably never had to think about before. And the list goes on and on and on ... Therefore, to dismiss a point of view out-of-hand on the grounds that it is different from the everyday experience of "the rest of the world" really begins to strain credibility. Jeff, I believe I've said many times that I have considerable respect for all of you at RT and for your accomplishments. Even though I may not understand all of the design decisions made in REBOL (or may disagree with some of the ones I understand ;-) I think it is a fine piece of work, and I hope to see it do well. But if this thread has gotten to the point where we're dealing in highly distorted exaggerations, put-down references to "academic correctness" or "those of the REDESIGN REBOL mindset", and appeals to rock and roll as replacements for sincere (and vigorous and humorous, too!) discussion of how to write better code in the real world, then I have to say that it's passed the point of diminishing returns for me. However, I'm still quite interested in your suggestions for how to accumulate and report character frequencies in a data file! Thanks for all the fish! -jn- -- ___________________________________________________________________ The purpose of computing is insight, not numbers! - R. W. Hamming joel'dot'neely'at'fedex'dot'com