Re: [heycam/webidl] Clarify nullable types for constants (#447)

tobie commented on this pull request.

Hey, thanks for helping out with this. I'm not super convinced this really clarifies, tbh. Not sure how to best handle that. Maybe check with WASM + WebGL to make sure no one wants nullable constants and get rid of them?

> @@ -5508,8 +5513,8 @@ the string “OrNull”.
     is written as <code class="idl">boolean?</code>:
 
     <pre highlight="webidl">
-        interface MyConstants {
-          const boolean? ARE_WE_THERE_YET = false;
+        interface NetworkFetcher {
+          void get(optional boolean? areWeThereYet = false);

Why is the constant gone from this example?

> @@ -1167,6 +1167,11 @@ If an [=identifier=] is used,
 it must reference a [=typedef=]
 whose type is a primitive type or a nullable primitive type.
 
+Note: For null to be able to become the value of a constant, at least one [=nullable type=] needs to

I'm unconvinced this really clarifies, tbh.

-- 
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/447#pullrequestreview-64702947

Received on Friday, 22 September 2017 21:32:38 UTC