I think this might have been mentioned for 1.6, but can we start more
proactively adding "use strict" pragmas to our modules for 1.7? Now that
FF4 is getting more stable (and surely will be released by 1.7) and has
use strict support, we have a decent platform to test on. This should be
a win in terms of improving code quality. A ticket:
http://bugs.dojotoolkit.org/ticket/12441
Thanks,
Kris

Search Discussions

  • James Burke at Mar 14, 2011 at 1:14 pm

    On Mon, Mar 14, 2011 at 9:34 AM, Kris Zyp wrote:
    I think this might have been mentioned for 1.6, but can we start more
    proactively adding "use strict" pragmas to our modules for 1.7? Now that
    FF4 is getting more stable (and surely will be released by 1.7) and has
    use strict support, we have a decent platform to test on. This should be
    a win in terms of improving code quality. A ticket:
    http://bugs.dojotoolkit.org/ticket/12441
    I suggest that if it is used, the "use strict" is inside the AMD
    factory function. There are issues with combining code that does a
    "use strict" at the top with code that is not "use strict" friendly. I
    have hit this with requirejs, so just something to be aware of. I have
    gone to a model of not using "use strict" but using JSLint to lint the
    code, I feel like it gives a decent tradeoff on getting the form in a
    more strict form. Although I'm curious where the gaps are with that
    approach vs. explicitly setting "use strict". I am sure there are
    some, the default value of "this" in unbound function calls probably
    being one (which we should not be relying on anyway).

    James
  • Ben hockey at Mar 23, 2011 at 9:42 am
    fyi - yesterday ff4 was released with support for "use strict" and this
    morning chrome 11 was released in the beta channel with support for "use
    strict". this gives us 2 reasonable platforms to test on.

    ben...
    On 3/14/2011 12:34 PM, Kris Zyp wrote:
    I think this might have been mentioned for 1.6, but can we start more
    proactively adding "use strict" pragmas to our modules for 1.7? Now that
    FF4 is getting more stable (and surely will be released by 1.7) and has
    use strict support, we have a decent platform to test on. This should be
    a win in terms of improving code quality. A ticket:
    http://bugs.dojotoolkit.org/ticket/12441
    Thanks,
    Kris
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Ben hockey at Mar 23, 2011 at 1:24 pm
    i should have said that chrome 11 has *improved* support for "use
    strict" - some support has existed since chrome 8. code i was using
    that was previously working in chrome 10 failed in chrome 11 due to an
    improper usage of "use strict". i assume this to be due to extra
    support for "use strict" introduced in chrome 11.

    ben...
    On 3/23/2011 9:42 AM, ben hockey wrote:
    fyi - yesterday ff4 was released with support for "use strict" and
    this morning chrome 11 was released in the beta channel with support
    for "use strict". this gives us 2 reasonable platforms to test on.

    ben...
    On 3/14/2011 12:34 PM, Kris Zyp wrote:
    I think this might have been mentioned for 1.6, but can we start more
    proactively adding "use strict" pragmas to our modules for 1.7? Now that
    FF4 is getting more stable (and surely will be released by 1.7) and has
    use strict support, we have a decent platform to test on. This should be
    a win in terms of improving code quality. A ticket:
    http://bugs.dojotoolkit.org/ticket/12441
    Thanks,
    Kris
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Ben hockey at Mar 24, 2011 at 3:55 pm
    i'm all in favor of trying to use strict mode but i wonder if we are
    severely limited in how we can apply it without breaking things. try
    this in ff4 - http://jsfiddle.net/xRYHq/

    it seems that any class created with dojo.declare while in strict mode
    will be unable to call this.inherited because of inherited using
    arguments.callee to find the caller. wouldn't this heavily reduce the
    number of places we can use strict mode?

    ben...
    On 3/14/2011 12:34 PM, Kris Zyp wrote:
    I think this might have been mentioned for 1.6, but can we start more
    proactively adding "use strict" pragmas to our modules for 1.7? Now that
    FF4 is getting more stable (and surely will be released by 1.7) and has
    use strict support, we have a decent platform to test on. This should be
    a win in terms of improving code quality. A ticket:
    http://bugs.dojotoolkit.org/ticket/12441
    Thanks,
    Kris
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Eugene Lazutkin at Mar 24, 2011 at 4:15 pm
    Last time I checked it was possible to update dojo.declare() to avoid
    using arguments.* If the strict mode is something we want for 1.7, I can
    look into that.

    Cheers,

    Eugene Lazutkin
    http://lazutkin.com/
    On 03/24/2011 02:55 PM, ben hockey wrote:
    i'm all in favor of trying to use strict mode but i wonder if we are
    severely limited in how we can apply it without breaking things. try
    this in ff4 - http://jsfiddle.net/xRYHq/

    it seems that any class created with dojo.declare while in strict mode
    will be unable to call this.inherited because of inherited using
    arguments.callee to find the caller. wouldn't this heavily reduce the
    number of places we can use strict mode?

    ben...
    On 3/14/2011 12:34 PM, Kris Zyp wrote:
    I think this might have been mentioned for 1.6, but can we start more
    proactively adding "use strict" pragmas to our modules for 1.7? Now that
    FF4 is getting more stable (and surely will be released by 1.7) and has
    use strict support, we have a decent platform to test on. This should be
    a win in terms of improving code quality. A ticket:
    http://bugs.dojotoolkit.org/ticket/12441
    Thanks,
    Kris
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdojo-contributors @
categoriesdojo
postedMar 14, '11 at 12:34p
activeMar 24, '11 at 4:15p
posts6
users4
websitedojotoolkit.org

People

Translate

site design / logo © 2022 Grokbase