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

Probable hash! bug

 [1/2] from: rsnell:webtrends at: 19-Sep-2000 10:55


A hash in an object doesn't seem to act like a block. Here is a console session that shows the problem.
>> o!: make object! [h: make hash! 10 b: make block! 10] >> probe o!
make object! [ h: make hash! [] b: [] ]
>> obj: make o! [] >> probe obj
make object! [ h: make hash! [] b: [] ]
>> append obj/h 'one
== make hash! [one]
>> append obj/b 'one
== [one]
>> probe obj
make object! [ h: make hash! [one] b: [one] ]
>> probe o!
make object! [ h: make hash! [one] b: [] ]
>>
Huh? It seems wrong that the word 'h in o! would be changed. The normal block 'b seems to be handled correctly, though. Rodney

 [2/2] from: al::bri::xtra::co::nz at: 20-Sep-2000 17:02


Rodney wrote:
> A hash in an object doesn't seem to act like a block. > Here is a console session that shows the problem.
<<quoted lines omitted: 26>>
> >> > Huh? It seems wrong that the word 'h in o! would be changed. The normal
block 'b seems to be handled correctly, though. Actually you've come across a "sort of" problem in Rebol. For: obj: make o! [] 'make does a _shallow_ copy of 'o!, not the _deep_ copy required. Bo mentioned to me that:
> Carl stated that maybe something like this would be incorporated into
REBOL in the future, probably in the form of MAKE/DEEP. There's a clone function written by Erin, that I'll post to the list soon. Andrew Martin ICQ: 26227169 http://members.ncbi.com/AndrewMartin/ http://members.xoom.com/AndrewMartin/

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted