Re: [heycam/webidl] Allow dictionary default values to reference type members (#717)

As @kainino0x indicated I think the underlying issue here is that there might be a performance benefit to having API-styles that are more C-like and less JavaScript-like. And as you get closer to the metal it might make sense to endorse such styles, as already happened with WebGL. And it seems likely that with Wasm there might be an increase in demand for such APIs too.

On the flipside, this kind of thing came up for [`encodeInto()`](https://encoding.spec.whatwg.org/#interface-textencoder) and there we decided (see https://github.com/whatwg/encoding/issues/69#issuecomment-434541423 onward) that allocating a new view and returning a dictionary of which the members might be used to create another view was acceptable and could likely be optimized away (after discussion with those implementing, to be clear). I'm not entirely convinced we've seen the end of that though.

cc @domenic @fitzgen @lukewagner

-- 
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/717#issuecomment-487009795

Received on Friday, 26 April 2019 10:27:22 UTC