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

[WEBIDL] nullable dictionary members

From: Jungkee Song <jungkee.song@samsung.com>
Date: Thu, 16 Aug 2012 11:05:33 +0900
To: cam@mcc.id.au
Cc: 'WebApps WG' <public-webapps@w3.org>
Message-id: <002b01cd7b53$a16d2880$e4477980$%song@samsung.com>
Hi Cameron,

I have a question about the use of *nullable* type for dictionary
definition.

Having said that dictionary members are inherently optional by definition,
is it meaningful (and valid) to mark optional fields as nullable?

For example,

dicationary Foo {
    DOMString iWantToBeRequired = "Default";
    DOMString? iWantToBeNullable;
    DOMString iAmAlreadyOptional;
};

Do the two dictionary members "iWantToBeNullable" and "iAmAlreadyOptional"
semantically make any difference?

I was thinking spec writers sometimes encounter situations where they would
like to explicitly describe certain dictionary members are required while
others are not.

Regards,
Jungkee



Jungkee Song
Samsung Electronics
Received on Thursday, 16 August 2012 02:05:02 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:54 GMT