Hash style comments
jussi.kalliokoski at gmail.com
Wed Aug 8 09:57:36 PDT 2012
And even if it wasn't, it wouldn't make much sense to use the only
punctuation symbol we have left for comments where we already have two
On Wed, Aug 8, 2012 at 7:38 PM, Rick Waldron <waldron.rick at gmail.com> wrote:
> On Wed, Aug 8, 2012 at 11:58 AM, Trans <transfire at gmail.com> wrote:
>> Hi. First time posting to the list, so please forgive if I am not
>> following proper approach.
>> I'd like to make one proposal for future of EMCAScript. I would like
>> to see support for `#` comment notation.
> The # is already on hold for several potential syntax additions:
> - sealed object initializers
> - Tuples http://wiki.ecmascript.org/doku.php?id=strawman:tuples
> - Records http://wiki.ecmascript.org/doku.php?id=strawman:records
>> The reasons for this are more interesting than one might think.
>> First, of course, is the simple fact that `#` is a very common
>> notation among programming languages. It is used by Shell scripts,
>> Ruby, Python, even Coffeescript, and many others.
>> Secondly, `#` is preferable to `//` in that it is only one character
>> instead of two, and albeit subjective (IMHO) it just seems a little
>> bit more aesthetic.
>> But another reason, that few will at first consider, is the
>> relationship between JSON and YAML. Their respective development teams
>> made an effort to ensure JSON was a perfect subset of YAML. Now there
>> is consideration of JSON5 (https://github.com/aseemk/json5). JSON5
>> where as YAML supports `#` style comments. This causes the
>> superset-subset relationship to break. To help remedy this going
>> forward, it would be very helpful if EMCAScript also supported `#`
>> comments. The YAML spec could in turn add support for `//` style
>> To be clear, I am not suggesting that `//` be deprecated. That would
>> simply break far too much old code for no good reason! I am just
>> seeking for `#` to be supported too.
>> Thanks for consideration,
>> es-discuss mailing list
>> es-discuss at mozilla.org
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss