W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2008

Re: [whatwg] WebIDL and HTML5

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Wed, 27 Aug 2008 16:32:09 -0700
Message-ID: <c9e12660808271632t245e936cw82116aad1af2e668@mail.gmail.com>
To: "Web Applications Working Group WG" <public-webapps@w3.org>
On Wed, Aug 27, 2008 at 3:39 PM, Cameron McCormack <cam@mcc.id.au> wrote:
> Garrett Smith:
>> I disagree. That the DOM spec does not include null. It is very
>> verbose on what it does include, so it's not by accident.
> The fact that a boxed valuetype (in OMG IDL) was used to define the
> DOMString type leads me to believe that null was explicitly wanted as a
> member of that type.  That's different from dom Level 1 Core, where it
> was just a typedef:

If I'm reading the right spec[1], OMG IDL defines the string type
string consisting of all possible 8-bit quantities except null.

In cases where a String object is required, the programmer should pass
an empty String.

If an algorithm makes mention of handling null, then the handling is
part of the algorithm, not part of null. It is not that null has
become a member of the type that that method accepts.

>  http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-C74D1578
> Since there are some languages that include null in their string type
> and others that don't, and with DOM meant to be language agnostic, it
> probably made more sense to define the DOM string type as including
> null than not.

Which languages include the value null in their string type?

In that case that there are some, it would make more sense to go with
the least common denominator.


[1] CORBA 3.1
> --
> Cameron McCormack ≝ http://mcc.id.au/
Received on Wednesday, 27 August 2008 23:32:46 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:11 UTC