use strict 2

2013-07-24 Thread BelleveInvis
I think that we can provide a more strict mode to deal with some long-lasting 
defects. In more strict mode,
Implicit type conversion is disabled.Functions declarations are disabled. All 
`function(){}` are considered function literal expression.Statement labels are 
disabled or strictly restricted.A `break` statement or a fallthrough 
declaration is required to be added into the branches inside a switch 
statement.`eval` is disabled.   ___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Re: use strict 2

2013-07-24 Thread David Bruant
2013/7/24 BelleveInvis infinte.c...@hotmail.com

 I think that we can provide a more strict mode to deal with some
 long-lasting defects. In more strict mode,

Why?
Who does this benefit?
You provide 5 rules. What ties them together? Why not other rules?
What would be the benefit of this new mode over additional *external*
tooling (like TypeScript or JSLint/JSHint/ESLint, etc.)?

Be aware that TC39 seems to currently agree on the 1JS idea which is
pretty much not adding any new modes anymore. So you'll need to make a very
strong case to change their mind :-)

David
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Re: use strict 2

2013-07-24 Thread Claude Pache

I consider your first three complaints as features instead of defects, and the 
last one as an expert feature. The use strict directive corrected only 
objectively problematic misfeatures.

??Claude


Le 24 juil. 2013 ?? 11:35, BelleveInvis infinte.c...@hotmail.com a ??crit :

 I think that we can provide a more strict mode to deal with some 
 long-lasting defects. In more strict mode,
 
 Implicit type conversion is disabled.
 Functions declarations are disabled. All `function(){}` are considered 
 function literal expression.
 Statement labels are disabled or strictly restricted.
 A `break` statement or a fallthrough declaration is required to be added 
 into the branches inside a switch statement.
 `eval` is disabled.
 ___
 es-discuss mailing list
 es-discuss@mozilla.org
 https://mail.mozilla.org/listinfo/es-discuss

___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Re: use strict 2

2013-07-24 Thread Brendan Eich
BelleveInvis wrote:
 I think that we can provide a more strict mode to deal with some
 long-lasting defects. In more strict mode,

   * Implicit type conversion is disabled.
   * Functions declarations are disabled. All `function(){}` are
 considered function literal expression.


This in particular is a private fetish -- whatever floats your boat, but
nothing to put in the standard.

Function hoisting as a simplified letrec and to enable top-down program
source decomposition is a feature.

/be

   * Statement labels are disabled or strictly restricted.
   * A `break` statement or a fallthrough declaration is required to
 be added into the branches inside a switch statement.
   * `eval` is disabled.

 ___
 es-discuss mailing list
 es-discuss@mozilla.org
 https://mail.mozilla.org/listinfo/es-discuss
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss