This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27557 - Consider introducing a prose-friendly way to refer to enumerations
Summary: Consider introducing a prose-friendly way to refer to enumerations
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
Depends on:
Reported: 2014-12-10 17:52 UTC by Anne
Modified: 2016-10-22 16:41 UTC (History)
5 users (show)

See Also:


Description Anne 2014-12-10 17:52:32 UTC

Perhaps we should standardize on a convention on how to reference an enumeration value in a way that is not awful to read. Fetch currently maps /no CORS/ to "no-cors" but that gets somewhat verbose. On the other hand, I'd rather not use "no-cors" throughout the specification as that is harder to read.
Comment 1 Domenic Denicola 2014-12-10 17:54:54 UTC
To me just using the string values throughout makes the most sense.
Comment 2 Tab Atkins Jr. 2014-12-10 18:50:05 UTC
Yeah, I don't understand what's hard to read about using the literal string value.  Seems fine to me.
Comment 3 Anne 2014-12-12 15:12:14 UTC
Once e.g. background-image and friends are defined in terms of Fetch it seems rather ugly to have prose such as

  Let /request/ be a new request whose mode is "no-cors" ...

instead of 

  Let /request/ be a new request whose mode is /no CORS/ ...

but perhaps it is okay.
Comment 4 Tab Atkins Jr. 2014-12-12 15:19:18 UTC
Yes, that seems totally fine to me.  And will usually be much clearer, because it refers directly to the API surface in an intuitive way, rather than requiring a mapping between an abstract value and the actual enumeration that was passed in.
Comment 5 Travis Leithead [MSFT] 2014-12-13 00:42:38 UTC
Keep it simple :)