[Bug 23602] New: "optional any" is nonsense that should be disallowed

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23602

            Bug ID: 23602
           Summary: "optional any" is nonsense that should be disallowed
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebIDL
          Assignee: cam@mcc.id.au
          Reporter: bzbarsky@mit.edu
        QA Contact: public-webapps-bugzilla@w3.org
                CC: annevk@annevk.nl, mike@w3.org,
                    public-script-coord@w3.org

Or perhaps non-optional any is nonsense?

In any case, passing "undefined" to an "any" argument should presumably simply
preserve the "undefined" value, and it looks like
http://www.w3.org/TR/WebIDL/#es-any in fact specifies that.  Given that we no
longer differentiate between "undefined" and "omitted", what should passing
"undefined" to an "optional any" do?  It seems weird to treat that as "omitted"
when the "any" type can in fact represent the value.

I would argue that we should simply not have optional vs non-optional any: have
only "any", where it can always be not passed or explicitly passed as
"undefined", in which case it coerces the value to "undefined".

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Wednesday, 23 October 2013 06:39:27 UTC