On Wed, Jan 4, 2012 at 9:24 AM, Andreas Rossberg <rossb...@google.com>wrote:
> On 4 January 2012 17:39, Mark S. Miller <erig...@google.com> wrote: > [...] > >> Style guides will probably > >> suggest to put "use strict" on top of every Harmony program to escape > >> the mess. > > > > Every sane style guide will do so. And every linting tool should by > default > > warn on the presence of any non-strict code. And every IDE should offer > to > > make the code strict if it isn't already. > > Well, I had hoped that with ES6 we have more elegant ways of opting > into Harmony than something like the "use strict" kludge. I also > thought that that was part of Dave's motivation. > For style guides targeting ES6 only code, yes. They should simply advocate opting into strict mode in some way, and the preferred choice is unlikely to be "use strict";. For ES5, or for any code that must work on pre-ES6 browsers, "use strict"; is of course the only way to opt in to strict mode. I was thinking in terms of styles guides that anyone might write in the next three years. -- Cheers, --MarkM
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss