I seriously don't understand: Why bother? Why make things that used to
work no longer work? That's basically the only thing that "use strict"
at the global level will do for you.

--Josh

On Wed, Mar 13, 2013 at 11:21 AM, AJ ONeal <coola...@gmail.com> wrote:
> Ben,
>
> That is correct.
>
> See http://stackoverflow.com/a/4304187
>
> Although some shells or OSes may allow arguments to shebang, I've had issues
> with it on my setup (OSX and Linux with Bash and ZSH).
>
> And then there's Windows...
>
> I believe my solution will also work on Windows, but it's certainly not the
> ideal solution.
> I think that would be a native bin that invokes node with strict mode.
>
> AJ ONeal
> (317) 426-6525
>
>
> On Wed, Mar 13, 2013 at 11:18 AM, Ben Noordhuis <i...@bnoordhuis.nl> wrote:
>>
>> On Wed, Mar 13, 2013 at 6:03 PM, AJ ONeal <coola...@gmail.com> wrote:
>> > Perhaps the very best part of node v0.10.0 is that all of the core
>> > modules
>> > are finally fully ES5 compliant!!!
>> >
>> > Although, you can't use es5-compliant mode with a shebang
>> > (because you can't pass the --use_strict argument),
>> > so I made a shim that will run node in es5 (strict) mode for you. [0]
>> >
>> > Install
>> >
>> >     sudo npm install -g node-es5
>> >
>> > Usage
>> >
>> >     #!/usr/bin/env node-es5
>> >
>> > (P.S. Dear core devs: please provide a native cli for strict mode node)
>> >
>> > Except in the case that you're writing code that also runs in the
>> > browser,
>> > you can now skip the obligatory
>> >
>> >     (function () {
>> >       "use strict";
>> >
>> >       // code goes here
>> >     }());
>> >
>> > Not that there's any harm in putting it in... but it's just annoying.
>> >
>> > You can also take out `strict: true` from your `.jshintrc` for your node
>> > projects. (An `implicitstrict` option may come soon [1]).
>> >
>> > Anyway, this is certainly a GIANT step forward in eliminating the
>> > excuses of
>> > using bug-prone ES3 code.
>> >
>> > Hurrah to the Node Devs!
>> >
>> > AJ ONeal
>> >
>> > [0]: https://github.com/coolaj86/node-es5
>> > [1]: https://github.com/jshint/jshint/issues/924
>>
>> AJ, am I missing something?
>>
>>   #!/path/to/node --use_strict
>>   console.log('Hello, world.');
>>
>> You're saying that doesn't work for you?
>>
>> --
>> --
>> 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 nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com
>> 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 nodejs+unsubscr...@googlegroups.com.
>> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> 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 nodejs+unsubscr...@googlegroups.com.
> 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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
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 nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to