W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2011

[Bug 14878] Rename const to legacyconst

From: <bugzilla@jessica.w3.org>
Date: Fri, 25 Nov 2011 20:21:49 +0000
To: public-script-coord@w3.org
Message-Id: <E1RU2HN-0006H1-QP@jessica.w3.org>

--- Comment #18 from Aryeh Gregor <ayg@aryeh.name> 2011-11-25 20:21:47 UTC ---
(In reply to comment #16)
> Read what I wrote again: union, intersection, differencing. I never write
> "membership testing". Yeesh.

This might theoretically be an advantage, but I haven't yet seen an actual
use-case where it's important.  If this were common, it could be fixed by
introducing union/intersection/difference functions or operators for arrays
and/or objects.  Given that it's not common, authors can just write these
functions themselves and it's no real loss.

> Your overlong comment ignores actual use-cases of numeric consts in WebIDL,
> notably https://www.khronos.org/registry/webgl/specs/1.0/.

It looks to me like those constants are present only for compatibility with
preexisting APIs, in this case C APIs.  That use would be completely
inappropriate for a JS API that's being made from scratch, so the term
"legacyconst" is suitable.

> Do not impose policy at the level of mechanism.

I don't suggest we ban consts, just make it clear that they're not recommended
for new APIs.  We already do it for legacycaller.

Web standards are developed in a decentralized fashion, a lot of them by people
who work primarily in C++ and aren't intimately familiar with either JavaScript
programming or the web standards world.  Once they're implemented, sometimes by
the same small group that wrote the specs without much outside review, any
mistakes get set in stone.  Those of us who are working on core standards like
WebIDL or DOM4 should be working to convey best practices to everyone working
on more peripheral standards that get less review.  Naming in WebIDL is one of
the very few places where we can actually get a message out to a lot of spec
writers with very little effort.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Friday, 25 November 2011 20:21:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:04 UTC