[REBOL] Re: On mutability and sameness
From: larry:ecotope at: 6-Jun-2001 16:07
> But it is equally inaccurate to assume that they are fixed-size
> scalar values, isn't it?
> >> foo: 126.96.36.199.188.8.131.52.1.0
> == 184.108.40.206.220.127.116.11.1.0
> >> repeat i 10 [print foo/:i]
>> foo: 18.104.22.168.22.214.171.124.9.10.11
** Syntax Error: Invalid tuple -- 126.96.36.199.188.8.131.52.9.10.11
Not necessarily, they could be fixed size at 10 bytes (which BTW shows that
Volker's rule of 8 bytes does not hold). The "scalar" types could be tagged
pointers (references) as suggested by Volker. A few bits in the pointer
could designate the type and whether the value is contained within the
pointer. As you probably know this is a common way of implementing "scalar"
types in Scheme. For tuples, there could some bits in the pointer that say
how long the tuple is with a max of 10.
It is interesting to note that when an empty block is created:
>> b: make block! 10000
system/stats shows that 16 bytes of memory have been allocated for each
block element. This might indicate that REBOL "pointers" or "references" are
16 bytes in length. Just a speculation...
PS This is fun too:
>> foo: 1.........