- From: Cameron McCormack <cam@mcc.id.au>
- Date: Fri, 09 Dec 2011 13:16:06 +1100
- To: Anne van Kesteren <annevk@opera.com>
- CC: public-script-coord@w3.org
On 20/10/11 1:25 PM, Anne van Kesteren wrote: > Strings are intrinsically meaningful and therefore have no need for > constants in APIs for the platform. See XMLHttpRequest.responseType and > the <canvas> 2D API for examples. We should remove string constants so > people (e.g. public-web-perf) will not use them and introduce > inconsistent APIs. This sounds like an argument against string constants used for enum-like values. (We already convinced the Web Perf folks not to use string constants in this case.) What about something like: interface A { const DOMString HTMLNS = "http://www.w3.org/1999/xhtml"; }; There are no string constants currently like this (a convenience because people have difficulty remembering such strings), so my question is whether we want to disallow them.
Received on Friday, 9 December 2011 02:16:39 UTC