Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Expression for the global object Date: Sun, 31 May 2015 17:33:17 +0200 Organization: PointedEars Software (PES) Lines: 33 Message-ID: <1658801.5VaNTTmUhE@PointedEars.de> References: <87twuthx5h.fsf@bsb.me.uk> <5452925.Zt9fTqAOub@PointedEars.de> <87382cj1f5.fsf@bsb.me.uk> <7546503.qSl4iIXIz1@PointedEars.de> <87wpzohk1k.fsf@bsb.me.uk> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1433086553 9532 eJwNycEBwCAIA8CVQAmBcQRl/xHa+x62qzfN4YbBdFDyvCXS/At3RvuGaLGS4KnolybMWptzPxgYEQs= (31 May 2015 15:35:53 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sun, 31 May 2015 15:35:53 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwQkBACAIA8BMyjOIM0D6R/DOxI831M3V1nZ5Ucl+OzDxanARqUV9IqHOPBfowxJDT/CmzVKc1frmA3X/Fo0= Cancel-Lock: sha1:sdh4iDzBeUMuD+JU/eU6VPZbfxo= X-NNTP-Posting-Host: eJwFwYEBgDAIA7CXYKwFz5Ei/59ggqBTeQleLHbYzDKZnDMBA1BvMJ4865/6hE1pxWFy+wcRBxEG Xref: csiph.com comp.lang.javascript:27946 Ben Bacarisse wrote: > Given: > > 'use strict'; > console.log((function () { return eval; })()("this") === global); > console.log(eval("this") === global); > console.log(this === global); > > nodejs prints: > > NaN > undefined > undefined No, it does not. Because Node.js’s V8 JavaScript is not so badly designed that it would print “NaN” or “undefined” as the result of a “===” operation. > […] >> > > Sure, but what does 15.1.2.1.1 (Direct Call to Eval) have to say about > it? You can interpret the words there much more readily than I can, and > it would seem that at least one implementation has decided that the > evaluation of the thunk above is not a "direct call to eval". We’ll see. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.