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

[REBOL] Re: Associative data store Re:(4)

From: g:santilli:tiscalinet:it at: 16-Sep-2000 18:35

Hello [joel--neely--fedex--com]! On 15-Set-00, you wrote: j> Third, IMHO it would be VERY bad to force implementation j> details (such as how or where keys and values are stored) upon j> the user of the CONCEPT of associative array. The words j> 'first, 'second, etc. describe position, [...] j> Suppose (this is hypthetical, but please look beyond the j> specifics of the example to the underlying principle) Carl and j> company figure out a new memory management technique in the j> course of fixing the "use vs. GC" bug (hint, hint ;-) and j> decide to change the internal representation of objects so j> that the list of words within the object's context is no j> longer the "first" attribute of the object. How many scripts Actually, the list of words doesn't have to be the "first attribute" of an object for FIRST to work. FIRST is an ACTION!, so a "method" in the value (every REBOL datatype has a table of methods that apply to its values). In particular, FIRST is the
>> second :first
== 41 41st function in the table for any value. (Yeah, this is speculation, but its reasonable, isn't it?) Of course, I agree that "first" is not a good name for "get the words of this object". I stongely suggest RT to add:
>> words-of: :first >> values-of: :second
and so on... (using whatever names they find appropriate) j> etc. In other words, real support for context! as a j> first-class data type, along with meaningful names for j> officially sanctioned interfaces to, and operations using, j> context! values. This would be a good thing, too. :-) Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/