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 16439 - Avoid reserved words for variables
Summary: Avoid reserved words for variables
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: Sun Windows ME
: P2 enhancement
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
Depends on:
Reported: 2012-03-19 19:33 UTC by Marcos Caceres
Modified: 2012-03-21 23:37 UTC (History)
2 users (show)

See Also:


Description Marcos Caceres 2012-03-19 19:33:09 UTC
The spec reads:

"Let class be a string whose value is determined as follows:"

Using the word "class" makes it annoying during implementation, because class is reserved in many languages (hence I can't "var class = "). Please change it to <var>classType</var> or some such. This makes it easier to implement makes the spec and implementation consistant.
Comment 1 Cameron McCormack 2012-03-21 23:37:55 UTC
There is no requirement that algorithms be implemented as is, especially since they are pseudocode and not actual code.  I don't think it's worth changing this -- I had wondered at some point whether I would change my variable names to be possible space separated words, as the HTML spec uses, since that should make some things more readable.  You would have even more of a problem, then. :)