Re: [heycam/webidl] Extend the dfn of object types. (#211)

> it is not clear, from my perspective, whether "a union of types on which [NewObject] is allowed" means (object_type or object_type) or (object_type or non_object_type)

Good question.

For a return value that doesn't always return an object (i.e. the latter case), it's not clear what [NewObject] would really mean.  Or rather, the current definition of [NewObject] as "a reference to a newly created object must always be returned" doesn't make sense in that case, right?  Nullable types have the same concern.  That makes the given PR not really make much sense, when read literally.

We could make that definition more complex to make it more broadly applicable, of course.  But normally [NewObject] functions would be some sort of a "construct an object and return it" function.  It's pretty odd to allow such a thing to also return non-objects.

What is the fetch use case here?

-- 
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/pull/211#issuecomment-258944372

Received on Monday, 7 November 2016 19:56:46 UTC