Re: New slice operator
- Posted by Fernando Bauer <fmbauer at hot?ail.co?> Apr 26, 2008
- 700 views
c.k.lester wrote: > > Fernando Bauer wrote: > > A possible definition of the new operator '~' is: > > s[a~b] =: s[min(max(1,a),$+1) .. min($,b)] > > You're really trying to aggravate those of us with US keyboards, aren't you? > :D After the invention of QWERTY keyboard, nothing more is so bad. > > How about the colon, instead? > > x[1:4] > > That's a little easier. I proposed the 'tilde' just because it can represent the idea of range like the character '-' and it's not used. How do you distinguish a slice s[a:b] from a variable subscript with a namespace s[a:b]? Regards, Fernando