extending foreach for keyed ranges and other usage of datastructures

monkyyy crazymonkyyy at gmail.com
Thu May 16 18:21:16 UTC 2024


On Thursday, 16 May 2024 at 18:15:09 UTC, Quirin Schroll wrote:
> On Wednesday, 15 May 2024 at 20:27:12 UTC, monkyyy wrote:
>> extend the api of foreach to allow for 
>> `foreach(key,value;data)` for user data types,
>>  and user defined "autodecoding"
>>
>> […]
>
> Can’t `opApply` not already do that?

opApply cant effect T[] to have int indexes and range.enumerate 
has problems with strings; and if you have key,value pairs you 
must always use it in all foreaches even if you only use value 
while slices get special treatment


More information about the dip.ideas mailing list