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

[REBOL] Re: On ordinal and cardinal numbers...

From: kenneth:nwinet at: 7-Jul-2001 14:10

Hello all, A guiding principle for me is simplicity. Mark's suggestion of a switch is simple but introduces mode which IMHO should almost always be avoided. Of the suggestions put forth by Joel, Ryan and others I would with respect say the following: I emphatically do not like the idea of adding new words that are variations on existing words but the /zero refinement seems most in the spirit of Rebol. Having said that, and even though I think it is a huge mistake for the reasons I will outline (not reiterating the technical points which have been very well represented in this discussion but a touch more on philosophy) I would think it best to remain with the 1-based indexing until such time that Carl changes his mind on the matter. I do a lot of maintenance coding. As a result, although I produce a lot of new code I amazingly find myself reducing the amount of code in a project on any given day. Hardly ever have I seen code, whether I produced it or someone else, that with a little more thought could be made less complicated, cleaner, more elegant, easier to understand, efficient, or... well, you get the idea. There are times when you stop and look at what you've done and you see the very rightness of it. It's a thrill and nobody can take it away from you. Then there's the satifaction of working with some great programmers. When some ask me to review their code I might note that they know there's something not quite right. On those occasions where I can offer a simpler solution I may be giving something that will be carried to others. This isn't always something you can prove or disprove (especially when the very rules of proof are not agreed upon.) But you can sense the rightness. There's a lot of Hype surrounding Rebol which is not unusual when promoting a language, but I want to think about the phrase I've heard that Rebol can take us to the stars. This implies that the language is somewhere on the path that began with stone knives. It also implies that Rebol will not someday be realized to be a dead end as so many others before it have been. For better or worse the design decisions made today guide the very thoughts of the people that will use and produce Rebol code in the future. So is there a rightness about the Rebol language? Obviously so, or there would not be the fuel to ignite the hype. However, there is a dichotomy. What is real and what is artificial? I am of the camp that believes that rigorous proof (as found in mathmatics) is real. I believe that how people feel about doing something because they've always done it that way is artificial. Today, we do not do what we've always done. If we look back at examples, they are embarrassing and silly. Look back 100 to 200 years and they are even more so. Go back a 1000 and things that every child knows today would be incomprehensible to the most educated person. We know the difference between ordinal and cardinal numbers. That has not always been the case. This is a maturing understanding. Most of the numbers we deal with are cardinal and what people think of when we talk about numbers. The ordinal numbers first, second and so on came about as a mapping of position in a series to the quantity to that point. Offsets obviously start from zero (here is always zero away from here - argue against that point at the risk of being revealed...) However, there is no rule anywhere that says what number applies to the position in a series. It is only convention (and simplicity of algorithms) that makes us start with a low positive integer (zero or one) and proceed to assign the next higher integer to the next position. So that leaves us in the uncomfortable position that if we choose zero as the first integer assigned to a position, we've just equated (first = zero.) It's very understandable that some people would be repelled by that. Give it time, in 100 (or 1000) years it will seem natural to you. I have no more to say at this time on this subject. It's been interesting, Ken.