Re: mainly syntax
- Posted by "BABOR, JIRI" <J.Babor at GNS.CRI.NZ> Feb 19, 1998
- 675 views
Pete Eberlein just wrote: >How about a slice end denoted by "..]"? For example, > >s = s[2..] > >No new keywords, no extra typing for those lazy folks, and it makes sense >to me. A very interesting twist, much better than my original '-1' suggestion, but I suspect quite unacceptable to people who insist all keywords must have 7+ letters. Thinking about it now, I like best David's alternative, simply because it allows more general shorter/faster/clearer(?) tail indexing, as in, for example, x = s[end-2], or s = s[3..end-1] instead of current x = s[length(s)-2], or s = s[3..length(s)-1] Thanks, Pete, also for the explanation of the 'foo/bar' thing. Jiri