Re: [heycam/webidl] A non-optional dictionary argument makes sense at times. (#130)

This was a conscious design decision.  The idea was that in general when using a dictionary in trailing position (i.e. as an options object), omitting it and passing empty object should have equivalent behavior.  Since the default argument behavior is to not be optional, if we didn't have this spec requirement people would be commonly writing specs which had required option object arguments.  And most option objects don't have the complicated "must provide at least one of these properties" behavior mediacapture does.

So the decision was made to nudge people in the right direction in the simple cases.  The complicated cases get the behavior they want for free anyway, because they have to consider the case of `{}` getting passed and the behavior of not passing the argument is _exactly_ the same as passing `{}`.  So they don't even have to write extra prose to get the effect they want.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/130#issuecomment-225856439

Received on Tuesday, 14 June 2016 11:43:24 UTC