From: Nicolas C. <war...@fr...> - 2004-09-11 19:18:52
|
> > > I would have suggested "slice" just to be consistent with > > > ExtString.String.slice, but since it uses the (index,len) > > > approach instead of (first,last) and is also much stricter > > > it might be confusing to use the same name. > > > > Actually, (first, last) would be easier to implement. Is there a > > preference in the group? > > First,len has the advantage that the last node must > be in the same list. However, first,last is probably > more useful in some circumstances -- and works even > when the two nodes are in a distinct list. > > So I can't decide. I think the semantics are > sufficiently different to provide both. First,len > can be implement by starting at first, advancing len, > and then calling first,last. Or even use options > > ?first ?last ?len Brian, please don't listen to him :) Since the two are really same, I would prefer the current index, len. You can simply add index to len if you want to get last. Slice or splice are both ok, sub also. Nicolas |