poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal to change the ranges in array trimming to be "half-open" in


From: Mohammad-Reza Nabipoor
Subject: Re: Proposal to change the ranges in array trimming to be "half-open" interval
Date: Mon, 16 Nov 2020 02:37:26 +0330

Hi, Jose.

On Mon, Nov 02, 2020 at 09:03:07PM +0100, Jose E. Marchesi wrote:
> 
> That said, Egeyar's suggestion is definitely intriguing.  It is was to
> be supported at some point, however, I would use a very different
> syntax.
> 

I was reading the wikipedia entry for Icon programming lanuage [1], and I came
across this example:

```icon
 "Wikipedia"[1]     ==> "W"
 "Wikipedia"[3]     ==> "k"
 "Wikipedia"[0]     ==> "a"
 "Wikipedia"[1:3]   ==> "Wi"
 "Wikipedia"[-2:0]  ==> "ia"
 "Wikipedia"[2+:3]  ==> "iki"
```

The `[2+:3]` caught my eye! That's exactly what Egeyar wants.
WDYT?


Regards,
Mohammad-Reza


[1]: https://en.wikipedia.org/wiki/Icon_(programming_language)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]