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

[REBOL] Fwd: Re: Re: On mutability and sameness

From: robbo1mark:aol at: 19-Jun-2001 12:40

sorry if you receive this twice - AOL playing up today! -- Attached file included as plaintext by Listar -- Return-Path: <[Robbo1Mark--aol--com]> Received: from web36.aolmail.aol.com (web36.aolmail.aol.com [205.188.222.12]) by air-id09.mx.aol.com (v79.20) with ESMTP id MAILINID98-0619123520; Tue, 19 Jun 2001 12:35:20 -0400 Date: Tue, 19 Jun 2001 12:35:19 EDT From: [Robbo1Mark--aol--com] Subject:Re: [REBOL] Re: On mutability and sameness To: <"[rebol-list--rebol--com] ; Oscar-Project"@egroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Unknown (No Version) Message-ID: <[dd--1633808b--2860d948--aol--com]> Everybody, consider these examples of any-block! values
>> a: load "( 1 + 2 )"
== (1 + 2)
>> :a
== (1 + 2)
>> parse :a [b:]
== false
>> b
== [1 + 2]
>> a: make hash! [ add 3 4 ]
== make hash! [add 3 4]
>> parse :a [b:]
== false
>> b
== [add 3 4]
>> insert b 'negate
== [add 3 4]
>> b
== [negate add 3 4]
>> a
== make hash! [negate add 3 4]
>> a: make list! [ power 3 4 ]
== make list! [power 3 4]
>> parse :a [b:]
== false
>> b
== [power 3 4] It seems that we can make instances of the same any-block! data values even though the block!s are of different datatype! eg Paren! Block! Hash! List! etc. These too can be modified and changes to either effect both. So for series! values we seem to have only 2 base implementation models which are any-block! and any-string!, the rest are simply a change in the datatype! field. My model for series values has 4 fields which are series.datatype series.length ; Total number of values not length from index to tail series.index ; the current series position series.value ; the actual "data" values of the series which can be ; of any-type! for any-block! series and of ; char! for any-string! series. I hope you find this model and examples helpful and instructive, I cannot guarentee that this model is entirely accurate or complete, only that it's seems to work at present. Hopefully my friendly neighbours will help me "paint my fence" by helping to show where this model breaks or is incomplete. Cheers my REBOL friends ( of whom I sincerely hope includes Jeff & Holger even though we may not always be in complete agreement! ) For the record Monet & Van Gogh are my favourite painters. Impressionists of course! 8-) Mark Dickson