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

[REBOL] Re: Antwort: Re: WYSIWYG programming

From: joel:neely:fedex at: 30-Oct-2000 16:45

Hi, Holger, I'm skipping your interesting comments on vNL and self-referential code for the purpose of this post (in interest of brevity). I must say, in passing, that I found them quite interesting and worthy of careful reading and thought. [rebol-bounce--rebol--com] wrote: [in a different order...]
> I don't disagree with you that there may very well inconsistencies in > REBOL (and if so, we need to think about resolving them). I just don't > think that the example you gave illustrates one such case. > No. We cannot compare logic! values by magnitude because no ordering > has been defined for the logic! value domain. We CAN compare logic! > values for (in)equality.
Actually, REBOL *has already* defined such an ordering. Consider
>> sort reduce [on off no yes true false]
== [false false false true true true] Clearly SORT thinks that FALSE < TRUE. Isn't it reasonable to ask that < <= > and >= to be allowed to agree with SORT?
> You are implying that whenever there exists a conversion between two > data types, and for both of them an ordering has been defined, that > the orderings of both data types are equivalent, i.e. the relative > position of any two items should remain the same after the conversion. > > This assumption is, from experience, not always true. For instance > consider the domains "signed integer" and "unsigned integer", of > equal bit length, in C ("int" and "unsigned int" for example):
A few observations in response: 1) Mistakes in the design of C be on the heads of its designers! Just because they made some bad choices doesn't mean REBOL has to. ;-) 2) Typecasting a bit pattern to reinterpret the bits is not the same as a true conversion, in which there is a semantic identification of the actual values. Once we start playing low-level bit-pattern games, we can come up with all sorts of oddities. One of the virtues of REBOL, IMHO, is that it is a high-level language that keeps us out of the bit-swamp. 3) I didn't say "whenever". Any of us can easily define mappings in which the concepts of order change from one interpretation to the other. For instance 1 < 2 < 12, but "1" < "12" < "2". However, in such cases, 3a) There are usually multiple ways to do the conversion, depending on the actual task at hand -- one still can obtain 1 < 2 < 12 and " 1" < " 2" < "12" by choosing to use a conversion that DOES retain order. 3b) The very concept of ordering may be application dependent, or may be a compromise of other forces. The "asciibetical order" commonly used for ordering strings works well for words in a dictionary, but poorly for alphabetizing street addresses. REBOL doesn't supply multiple ways to convert between integer! and logic! data, nor is it obvious why such would be needed. -jn- -- ; Joel Neely [joel--neely--fedex--com] 901-263-4460 38017/HKA/9677 REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] { | e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]