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

[REBOL] Re: Core 2.5.5 Beta Versions

From: lmecir:mbox:vol:cz at: 23-Feb-2003 19:48

Hi all, I would like to welcome Elan too. <Gabriele wrote:>
> (Anyway, the proposal I and Romano sent to feedback asked > for a different solution to the problem; I still think it would be > better.)
I don't know your proposal, but I suspect, that its feasibility was questionable (for the current interpreter implementation). <Joel wrote:>
> > How to resolve this situation of confusion between out-of-range > > series and tail series? > > > I suggest that the following behavior for series values is simple, > and also makes sense (not always the same! ;-) > > - INDEX? should *always* return the "position" of the series, > regardless of the number of values in the underlying sequence.
Count my vote for this too. I call it a REAL-INDEX? as opposed to any adjusted indices. My reasons for it are: 1) Compatibility: this behaviour is the most compatible, because if we had such a function, it would be easy to define an PRE-255-INDEX? as follows: PRE-255-INDEX?: func [ [catch] s [series!] ] [ either real-index? :s <= (real-index? tail :s) [ real-index? :s ] [ throw make error! "Out of range" ] ] as well as INDEX?-255 INDEX?-255: func [ [catch] s [series!] ] [ either real-index? :s <= (real-index? tail :s) [ real-index? :s ] [ throw make error! "Out of range" ] ] , while neither of these can be used alone to define REAL-INDEX?. 2) Symmetry: REAL-INDEX? is much more symmetrical, than any other implementation proposed (its behaviour doesn't depend on some factors, that are essential for other proposed indices).