- From: Boris Zbarsky <notifications@github.com>
- Date: Fri, 01 Jun 2018 21:28:48 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 2 June 2018 04:29:12 UTC
> But we don't. We can write: Specifically for dictionaries with a required member, because those correspond to a set of arguments at least one of which is required. > Function arguments are required by default whereas dictionary members are optional by default Dictionaries as initially designed are meant to be equivalent to a bunch of trailing optional arguments, but easier to use because you can specify only the arguments you want instead of all the ones before the last one you want (with undefined for the ones you don't want). If JS supported named-argument passing like Python, this pattern likely would never have been invented in the first place; it's there to work around the fact that JS only has positional arguments. -- 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/76#issuecomment-394057351
Received on Saturday, 2 June 2018 04:29:12 UTC