[REBOL] Re: Core 2.5.5 Beta Versions
From: g:santilli:tiscalinet:it at: 24-Feb-2003 14:06
Hi Joel,
On Monday, February 24, 2003, 12:44:37 PM, you wrote:
JN> Horrors! 8-0
I disagree. ;-)
JN> range or not). A script could then easily determine in advance
JN> whether a series ref was "safe" to use or not, without having
JN> an error thrown.
I get accused of being too "implementation dependent", but when I
try not to be I get accused of not being. ;-) Out-of-range series
are an implementation artifact. From an "abstract" point of view
they make no sense. (IMHO)
JN> Seriously, I *strongly* dislike having the language change things
JN> behind our backs, instead of just giving us a straightforward way
JN> to look at the actual situation and make our own decisions.
You can think of it as if out-of-range series did not exist. If
you think it this way, there's nothing changing behind our backs.
:-)
JN> In the following transcript:
JN> >> a: "1234567" ; == "1234567"
JN> >> b: at a 4 ; == "4567"
JN> >> clear at a 3 ; == ""
JN> >> a ; == "12"
JN> >> append a "CDEFG" ; == "12CDEFG"
JN> >> b ; == "DEFG"
JN> the position of B is *temporarily* out of bounds while the string
JN> in A is being massaged. At the completion of that massaging,
JN> however, B now provides access to what is at the corresponding
JN> position in the new data. That seems useful to me.
My proposed change would not change that piece of code. You do not
access B so the interpreter does not have chances of resetting it.
JN> from the data source. B is keeping up with which part of A we
JN> need to look at (for every A that has that much data).
Hmm, I don't think that exact piece of code would do that, but I
see what you mean. Since INDEX? B does not change inside the loop
you just save it and don't need to access B if it is out-of-range.
JN> I'm certainly not saying that this is the only (or even best)
JN> way to write this little fragment, but just trying to illustrate
JN> that knowing where you were in a series (or being able to look
JN> at that same place again) is a useful concept, regardless of how
JN> the data in the series may change.
You *can* look at any place with the AT function anyway, so I
don't think this is really that useful.
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r