Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #27927
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Expression for the global object |
| Date | Sat, 30 May 2015 15:20:34 +0200 |
| Organization | PointedEars Software (PES) |
| Lines | 49 |
| Message-ID | <1568146.gjZlAL6gd7@PointedEars.de> (permalink) |
| References | <JavaScript-20150528222318@ram.dialup.fu-berlin.de> <645d86ba-2299-4371-bb64-90dae6df316a@googlegroups.com> <1442639.SsZ0RATE5U@PointedEars.de> <79b520ed-6efe-4064-a9cf-ea66c60f00df@googlegroups.com> <12824458.XGgQv3ng7H@PointedEars.de> <36af7f41-d441-48a2-81a1-28e16e063e54@googlegroups.com> |
| Reply-To | Thomas 'PointedEars' Lahn <cljs@PointedEars.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | 8Bit |
| X-Trace | solani.org 1432992194 23747 eJwNxskBwCAIBMCW5FjAchDd/ktI5jWwkJj0QDgIviWsO2+zZ2r3IrT1JKqEclIcal4Z1rf+fiz7ENg= (30 May 2015 13:23:14 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Sat, 30 May 2015 13:23:14 +0000 (UTC) |
| User-Agent | KNode/4.14.2 |
| X-User-ID | eJwFwYkBwCAIA8CVIJoo41ie/UfoHZdcebaozeF4lTj31QDMZaHzxT5pKCuFo0D7ImV1va0fIKx5o0az/AdLZRVV |
| Cancel-Lock | sha1:oWViObhnZ+be/eYdb+DZxg2O8yY= |
| X-NNTP-Posting-Host | eJwFwYEBwDAIArCXVhW8R0v5/4QlSB7eLoIFw+GGMnd79SZkvhmdzwhfiUiWcS3FDip/QVgSdQ== |
| Xref | csiph.com comp.lang.javascript:27927 |
Show key headers only | View raw
Michael Haufe (TNO) wrote:
> […] Thomas 'PointedEars' Lahn wrote:
>> | [[Scope]]
>
> [...]
>
>>[...] This scope is obviously "without "use strict"". [...]
>
> We need to be clear and consistent in terminology then. "scope" vs
> "[[Scope]]"
I fail to see a difference.
> I am using "scope" as it is commonly used: "the textual region of a
> program in which a binding is active".
So do I. However, it is prudent to use a definition from the ECMAScript
Language Specification when discussing implementations of ECMAScript.
> Thus, if I had the following:
>
> var x = "foo";
>
> (function(){
> var y = "bar"
> })();
>
> 'x' is still "in scope" inside the body of the function.
Yes.
> Following the same vein regarding "use strict";
"in scope" is a necessary, but not a sufficient criterion.
You can never be sure that your code is only executed in the global context,
and the global context always can enforce strict mode. In fact, it is
reasonable to assume that it is not, because of the side effects and of the
prevalence of the module pattern.
It is not logical to use approaches that make code less compatible than it
needs to be.
--
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Expression for the global object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-05-28 13:49 -0700
Re: Expression for the global object Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-28 22:59 +0200
Re: Expression for the global object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-05-29 07:24 -0700
Re: Expression for the global object Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-29 17:24 +0200
Re: Expression for the global object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-05-30 06:07 -0700
Re: Expression for the global object Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-30 15:20 +0200
Re: Expression for the global object Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-05-30 11:23 -0300
Re: Expression for the global object Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-30 19:05 +0200
Re: Expression for the global object Steven D'Aprano <steve@pearwood.info> - 2015-05-29 15:30 +1000
Re: Expression for the global object Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-29 12:25 +0100
Re: Expression for the global object Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-29 13:33 +0200
Re: Expression for the global object Steven D'Aprano <steve@pearwood.info> - 2015-05-29 21:50 +1000
Re: Expression for the global object Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-29 14:57 +0100
Re: Expression for the global object Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-31 16:18 +0200
Re: Expression for the global object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-05-29 07:31 -0700
Re: Expression for the global object Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-30 15:25 +0200
Re: Expression for the global object Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-30 18:56 +0200
csiph-web