Feature to get or add value to an associative array.

Jordan Wilson wilsonjord at gmail.com
Mon Apr 16 03:42:18 UTC 2018


On Sunday, 15 April 2018 at 22:55:41 UTC, Giles Bathgate wrote:
> On Sunday, 15 April 2018 at 22:52:47 UTC, Giles Bathgate wrote:
>> I am proposing a new function called getOrAdd in
>
> I posted details of the PR here because at least 2 people do 
> not like the name getOrAdd (and one of those people being 
> myself)
>
> Time for a bikeshed discussion...

I think Adding a Yes.add flag to the existing get makes sense, 
but property functions only have max 2 args.

Soooo...getOrAdd or getOrSet would be my pick.

Jordan


More information about the Digitalmars-d mailing list