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

[REBOL] Re: On mutability and sameness

From: joel:neely:fedex at: 17-Jun-2001 8:34

Ladislav Mecir wrote:
> I try to reformulate my argument: "your rule is correct only > in the circumstances not specified by the rule" > > This is a sufficient condition for the rule to be considered > incorrect. >
I'm sorry. I guess I need more coffee this morning, but I couldn't follow that one at all. Maybe we should bring this one to a close on the note that we simply agree to disagree. Each of us has a model for what is going on with respect to references and mutability, and in fact we seem to have differing definitions for those words. I've chosen the one that I use because - I think it give me a simpler way to explain a wider range of REBOL phenomena, - I think it is consistent with conventional jargon in Computing Science, and - it allows me to compare/contrast REBOL behavior with that of other programming languages easily. YMMV, of course, and you're certainly entitled to use and promote a different model. I welcome any and all challenges to the model I'm using (because that's how we find bugs!). I think it's fair to call the model "incorrect" only if there is a piece of REBOL code that produces a result/effect that is different than the model predicts, using the terminology of the model in the way that I've been using it. As far as the case below: a: [8] bm [a/1/1: 1] a ;== 9 all I can say is that BM is a very clever mini-interpreter that re-interprets its argument block as if it had been written a/1: a/1 or 1 which -- in my model -- changes the first element of the block (referenced by A) by replacing the integer 8 with a different integer (9), and not by modifying the 8 in-place. As ingenious as BM is (and I mean that sincerely!) it extends set-path expressions in a way that is outside standard REBOL behavior:
>> a: [8]
== [8]
>> a/1/1: 1
** Script Error: Cannot use path on integer! value ** Near: a/1/1: 1 and therefore doesn't prove anything about whether my model of standard REBOL behavior correctly predicts standard REBOL behavior. Again, let me express my sincere appreciation for your deep understanding of REBOL and for your discussions and time. -jn- ------------------------------------------------------------ Programming languages: compact, powerful, simple ... Pick any two! joel'dot'neely'at'fedex'dot'com