Re: [heycam/webidl] Sort out when dictionaries and records should have default values (#76)

> I understand where you're coming from but what's wrong in extending that earlier concept?

I think it's worth taking a step back for a second.

WebIDL consumers can always define arbitrary processing of things as desired; `any` and `object` are escape hatches that then let you do whatever.

Actual WebIDL syntax is meant to cover common patterns and promote best practices.  This is why dictionary arguments treat `undefined`, `null`, and `{}` identically: designing APIs that treat "no options object" and "empty options object" differently is not a best practice.

Now the question is what should be the best practice for this "nested dictionary" thing.  Are there examples of such APIs in JS libraries, designed by actual JS developers?  Because all the examples in specs pointed to above were created by C++ developers, and historically those are not very well clued-in to how JS APIs should look and act.

-- 
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-394090734

Received on Saturday, 2 June 2018 14:18:53 UTC