Not to keep being down on this post, but as long as YAML adds JS style comments, wouldn't JSON still be a strict subset?
On Wed, Aug 8, 2012 at 12:57 PM, Jussi Kalliokoski < [email protected]> wrote: > 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 > syntaxes. :) > > Cheers, > Jussi > > > On Wed, Aug 8, 2012 at 7:38 PM, Rick Waldron <[email protected]>wrote: > >> >> >> On Wed, Aug 8, 2012 at 11:58 AM, Trans <[email protected]> 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 >> http://wiki.ecmascript.org/doku.php?id=strawman:obj_initialiser_methods >> - Tuples http://wiki.ecmascript.org/doku.php?id=strawman:tuples >> - Records http://wiki.ecmascript.org/doku.php?id=strawman:records >> >> Rick >> >> >> >> >>> >>> 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 >>> adds support for comments, however it is Javascript style comments, >>> 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 >>> comments. >>> >>> 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, >>> trans >>> _______________________________________________ >>> es-discuss mailing list >>> [email protected] >>> https://mail.mozilla.org/listinfo/es-discuss >>> >> >> >> _______________________________________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> >> > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

