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

[REBOL] Re: URL & setword bugs

From: gscottjones:mchsi at: 18-Aug-2002 5:54

Hi, Paul, From: "Paul Tretter"
> The first part you referenced is not a problem. > We often set multiple values this way - such as: > > this: that: none > > This way everything can be set to none. > > Gotta be careful with this though as > some datatypes have problems doing this. > > And for your second example the test:i would be getting the value at index > 'i and not setting do to the placement of the ":". > > try: > > change test/:i "BBBB"
... does give ...
>> test
== ["a" "BBBB" "c" "d"] and then
>> change test/:i "b"
== "BBB"
>> test
== ["a" "bBBB" "c" "d"] which may or may not have been then intended action. I ask myself which result is the *least* surprise, and my guess is that it works correctly as is. So it seems that change test/:i "whatever" is an equivalent action to test/:i/1 but my expectation of Andrew's proposal would be test: ["a" "b" "c" "d"] i: 2 test/:i: "BBBB" test ; pseudo results ----> ["a" "BBBB" "c" "d"] I personally would like to see this type of action; I think it would add to the "intuitive" nature of the language. It is not clear that this behavior would break some other action/result. Can anyone else see that it does? Just curious. Thanks, Paul. --Scott Jones