[REBOL] Re: New REP
From: rotenca:telvia:it at: 23-Jan-2003 17:30
Hi Ladislav,
> Moreover, there is a question that needs an answer: When should the
> interpreter do the corrections?
>
> See e.g. another code:
>
> a: [1 2 3] ; == [1 2 3]
> b: tail a ; == []
> clear a ; == []
> ; b is out-of-range now
> append a [4 5 6]
> ; b is "in range" again
>
> I would not expect the interpreter to prevent B from being temporarily
> out-of-range in this case, because it really might mean "too much work".
I propose that the INTERNAL and external Rebol function to get the index of a
series should be:
proposed-index?: func [s][min index? s 1 + length? head s]
so b is never out of range for any access to the series.
I don't think it is a big work for the interpreter.
Do you see some problems in this?
---
Ciao
Romano