Path: csiph.com!1.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: not "autovivification", but ...? Date: Wed, 1 Jun 2016 18:46:48 +0200 Organization: solani.org Lines: 30 Message-ID: References: <73cd9155-4dba-40be-8cd8-2a18726969bd@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1464799605 3489 eJwNytsBADEEBMCWCIuU4xH9l3A33wMxtnY1mGKxvXOo88gICVroUXbrqlNJ6fzbiKWyL+/l6AR0soSc37PH5qAwzwjnvBqNpQwNnHFh+wCTzR16 (1 Jun 2016 16:46:45 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Wed, 1 Jun 2016 16:46:45 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 X-User-ID: eJwFwQkBwDAIA0BL5QkscihQ/xJ2BwuJTg+E4+E1jeSts5MhufgczmyzGj0HzXklFOVFiu4PEGoQgQ== In-Reply-To: <73cd9155-4dba-40be-8cd8-2a18726969bd@googlegroups.com> Cancel-Lock: sha1:eP+5IASnUEYpr9qtRMlC/UUBVqI= X-NNTP-Posting-Host: eJwNzMEBADEEBMCWCNYpB6H/Ei7P+YwJGO0Kg9rakqKk+8AyjFTvJg35HsaXTRF1MkAsl+fkTLQg44h4mm+11Sxd7ON+uMmp7iSvryBa+QGGTx4V Xref: csiph.com comp.lang.javascript:30595 On 01.06.2016 at 16:51, Michael Haufe (TNO) wrote: > On Tuesday, May 31, 2016 at 7:11:39 AM UTC-5, Christoph M. Becker wrote: > >> `this` is not special in this regard; you can assign to undefined >> properties of *any* object. > > Most, not any. For example: [1] > >> Also consider that accessing undefined properties of an object yield >> `undefined` (but not an error), so it appears to be logical to allow >> assigning another value to such undefined properties. > > That does not follow. Ex: > > //assume this function is defined in a 3rd party library > function getSomeObject(){ > return Object.seal({ > hello: "world" > }) > } > > [1] Thanks for pointing that out. I most certainly should catch up with ES 5.1 ASAP. :) -- Christoph M. Becker