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

[REBOL] Re: On mutability and sameness

From: joel:neely:fedex at: 13-Jun-2001 0:48

Hi, Holger, Just to clarify, since I apparently wasn't clear initially... Holger Kruse wrote:
> ... by definition, the date component of a date! value is > another date! value, so /date returns what it is supposed > to. >
I understand what it does, and wasn't suggesting that it was in error. Just that it looked funny.
> REBOL does not use different datatypes for "date without > time" and "date with time". They are both of type date!. >
But isn't this the only case in which a "component" of a complex (non-atomic) data type is of the same type as its container with unbounded descent? In all other cases, extracting a component gets something that is (in some well- defined sense) simpler than the whole with which one started. (Of course, I'm speaking of built-in types... One can always build pathological self-referential structures such as
>> pathology: [1 2] == [1 2] >> insert/only next pathology pathology == [2] >> pathology/1 == 1 >> pathology/2/1 == 1 >> pathology/2/2/1 == 1 >> pathology/2/2/2/1 == 1 >> pathology == [1 [...] 2]
Kudos to whomever implemented the infinite-recursion-bailout evidenced by the last line above!) -jn- ------------------------------------------------------------ Programming languages: compact, powerful, simple ... Pick any two! joel'dot'neely'at'fedex'dot'com