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

[REBOL] Re: Object of confusion

From: nitsch-lists::netcologne::de at: 7-Sep-2004 14:27

On Dienstag, 7. September 2004 01:42, [SunandaDH--aol--com] wrote:
> Here's a little puzzle that had me delving into the mysteries of sameness > and mutability. Maybe you'll enjoy it too: > > That's perfectly legal, even if it starts to give some odd results, e.g. > > same? a/b/b/b/b a > == true > same? c/b/b/b a > == true > same? c/b/b/b a/b/b/b/b/b/b/b/b/b > == true > > But they don't look the same: > > probe a > > make object! [ > b: > make object! [...] > ] > > probe c > > make object! [ > b: > make object! [ > b: > make object! [...] > ] > ] > > It confused me. (I'll leave it to the experts to explain what's going on)
Thats a feature!! :) As you said, this works: a/b/b/b/b/b/b/b/b/b . Now think you are mold: You see an object with an object inside with an object inside with an object ... In the old days every such structure leaded to an infinite loop when molded. Terrible while debugging. Then some cool RT-coder added a check for "did i print this?". Then mold prints [...] . instead of going infinite looping.
> Sunanda.
-Volker