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: Dan Čermák
Subject: Re: Proposal to change the ranges in array trimming to be "half-open" interval
Date: Wed, 18 Nov 2020 23:55:40 +0100

"Jose E. Marchesi" <jemarch@gnu.org> writes:

>> 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! :)

Indeed, I like it!

Attachment: signature.asc
Description: PGP signature


reply via email to

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