Add inclusive range operator

monkyyy crazymonkyyy at gmail.com
Fri Jul 25 18:57:28 UTC 2025


On Friday, 25 July 2025 at 18:41:12 UTC, Brother Bill wrote:
> We have range 10..15 which has elements: 10, 11, 12, 13, 14 but 
> not 15
>
> Recommend operator ..= as in 10..=15 or operator ... as in 
> 10...15
> This would produce inclusive range of elements: 10, 11, 12, 13, 
> 14, 15
>
> These operators are in other languages.
>
> I am sure that I am not the first to recommend this.

I suggested a `x..y+1` special case before this section even 
existed; was told to use the enum members trait or iota!"[]"


More information about the dip.ideas mailing list