@tdresser commented on the definition of requireCancelable:
Is there precedent for null being used to indicate the default value in APIs like this? Would an enum be clearer?
I'm not sure. I have a mild preference for boolean since this is really a 2-state switch. Another option might be to make it an optional member of the dictionary that's a simple boolean, rather than supporting an explicit 3rd value.
I think it's somewhat more natural to use an optional boolean, and use lack of presence in the dictionary to indicate default behavior, instead of null.
@tdresser commented on the definition of requireCancelable:
I'm not sure. I have a mild preference for boolean since this is really a 2-state switch. Another option might be to make it an optional member of the dictionary that's a simple boolean, rather than supporting an explicit 3rd value.