And jquery now uses use strict too! AJ ONeal (317) 426-6525
On Wed, Mar 13, 2013 at 4:49 PM, AJ ONeal <[email protected]> wrote: > FYI: grunt-init gruntplugin uses 'use strict'; for all grunt plugins. Yay! > > That's what we need to see more of! > It would be nice if npm init would follow suit (or maybe it already does > and I just haven't used it in 0.10 yet) > > AJ ONeal > (317) 426-6525 > > > On Wed, Mar 13, 2013 at 4:26 PM, Luke Arduini <[email protected]>wrote: > >> Since "use strict"; is function scoped people should just use it in their >> modules so you can use both strict/non strict modules together in happiness. >> >> >> On Wed, Mar 13, 2013 at 5:47 PM, AJ ONeal <[email protected]> wrote: >> >>> On Wed, Mar 13, 2013 at 3:22 PM, Adam Crabtree <[email protected]>wrote: >>> >>>> I would guess almost nobody runs JSHint with strict mode settings on >>>> all their dependencies as well. That would be a maintenance nightmare. >>>> >>>> Regarding slowdown, there's been many many people from Google and >>>> others who've seen empirically that there are currently no speed benefits. >>>> Here are just the few I was able to find real quick: >>>> >>>> From >>>> http://scriptogr.am/micmath/post/should-you-use-strict-in-your-production-javascript >>>> : >>>> @paul_irish said: "good post. good opportunity to point out you should >>>> run your unit tests against your production JS as well … also, last i asked >>>> the V8 guys, there is nothing that specifically accelerates strict mode … >>>> but of course, avoiding the slow non-strict stuff should keep your code off >>>> the slow paths inside the JS engines." >>>> >>>> From the v8-users list, >>>> https://groups.google.com/forum/?fromgroups=#!topic/v8-users/QVXyJKNShJQ >>>> : >>>> Rohit: Does V8's strict mode implementation offer any performance >>>> benefits? >>>> Jakob Kummerow: No. >>>> >>>> Again from the Nicholas Zackas post, >>>> http://www.nczonline.net/blog/2012/03/13/its-time-to-start-using-javascript-strict-mode/ >>>> : >>>> There is no reason to ship “use strict” in your production code. There >>>> is no performance gain (verified with V8 team and Brendan a while ago) and >>>> I don’t need my users’ VMs doing the extra checks as well. >>>> >>>> Also, IIRC someone in the previous strict mode discussion here verified >>>> that it does indeed run slower. >>>> >>>> Or how about about a handfull of different jsPerf tests? >>>> http://jsperf.com/use-strict-vs-array/3 >>>> http://jsperf.com/how-much-performance-is-gained-from-use-strict/3 >>>> http://jsperf.com/globalx/5 >>>> http://jsperf.com/use-strict-has-overheads-hmm-what >>>> >>>> Again, I'm not saying that performance isn't possible, which everyone >>>> agrees on. I'm talking about whether right now it is actually faster, and I >>>> haven't seen any declarations by people working on the project (or with the >>>> people) or test cases to indicate it is. >>>> >>>> Also, 13:30 is talk on callbacks in Dart. :-/ >>>> >>> >>> 12:30 is about callbacks in dart. 13:30 is about v8 optimizations. >>> >>> It's like I said: All of the code is run with strict mode optimizations >>> and then "bails out" when in runs into code isn't complaint. >>> >>> Putting "strict mode"; in your code is more for the purpose of built-in >>> linting. Except for some weird things - like that eval test from jsfiddle >>> that was just posted, there should be no difference in speed of JSHinted >>> code and formally declared "strict mode". The "strict mode" just ensures >>> that you can't at all accidentally use a particular set of bugs in the >>> language (some of which only affect readability and code quality, some of >>> which affect speed). >>> >>> It makes programming easier. >>> >>> As for the benchmarks, they're mostly testing very strange things - like >>> eval or returning the global object or the creation of a function with "use >>> strict" and the differences on most of them are less than 1% - which could >>> be than my processor sneezed on the loser. Y'know? >>> >>> You don't generally create 1,000,000 strict mode functions. Rather you >>> create you app in strict mode with a single IIFE and maybe it takes a few >>> extra ops to validate the stricter syntax or whatever. >>> >>> AJ ONeal >>> >>> >>> -- >>> -- >>> Job Board: http://jobs.nodejs.org/ >>> Posting guidelines: >>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >>> You received this message because you are subscribed to the Google >>> Groups "nodejs" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> For more options, visit this group at >>> http://groups.google.com/group/nodejs?hl=en?hl=en >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "nodejs" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "nodejs" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
