Feature to get or add value to an associative array.
bauss
jj_1337 at live.dk
Mon Apr 16 12:32:09 UTC 2018
On Monday, 16 April 2018 at 03:42:18 UTC, Jordan Wilson wrote:
> 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
I'm opposed to flags. I hate the whole "yes" "no" thing when it
comes to such things, just like the "true" "false"... It's a no
go for me.
A function name that fits would be perfect in my opinion.
More information about the Digitalmars-d
mailing list