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: Jose E. Marchesi
Subject: Re: Proposal to change the ranges in array trimming to be "half-open" interval
Date: Mon, 16 Nov 2020 09:03:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> 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?

That is a nice syntax! :)



reply via email to

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