Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: Object oriented programming Date: Sun, 7 Jan 2018 15:26:21 +0100 Organization: solani.org Lines: 36 Message-ID: References: <3c2333ff-00fe-4087-ab49-f52d0546b29b@googlegroups.com> <5d1ca5ad-55c3-43b5-b3d0-617e3150355e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1515335176 20104 eJwNyskBwCAIBMCWWBHEcjjc/ktIfvMYU4f32W6+jcaU0zoViYAlRKSquO3xRu/XUAZOg1d1gvr/Sl+TI8l4E7N6AoVsd/ZRmV/30MULsT7JEx9a (7 Jan 2018 14:26:16 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sun, 7 Jan 2018 14:26:16 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 Content-Language: de-DE X-User-ID: eJwNx8kBwCAIBMCWXGARyzEc/Zdg5jdUh+c2pxuHc6TlE9WF3R0srFxpt4gMnBpnIAET3vkfDw5SEJQ= Cancel-Lock: sha1:ZWFTojlnQ8G2P+Zh6qU1/Tlqgb8= In-Reply-To: X-NNTP-Posting-Host: eJwNybEBACEIBLCVBLkDxlGQ/Uf4L1IFm8JyI2gYTFWstrw7SD1KzEm7K55Zi9H55zNoxfX981y3pcw9vFaOthwiA1LM98J5YvxlQqXQ/ABiYB1G Xref: csiph.com comp.lang.javascript:34499 On 07.01.2018 at 15:13, John G Harris wrote: > On Sat, 6 Jan 2018 23:54:16 -0800 (PST), "Michael Haufe (TNO)" > wrote: > >> John G Harris wrote: >>> "Michael Haufe (TNO)" wrote: >>> >>> Regarding this : >>> >>> >>>> I am aware of the arguments of prototypical vs classical OOP though [3] and both sides. >>> >>> >>> Note that in this paper : >>>> [3] "Psychological Criticism of the Prototype-Based Object-Oriented Languages" >>> >>> a prototypal language is defined as one where a new object can only be >>> created by cloning another object. This is most definitely not >>> ECMAScript. >> >> A distinction that doesn't make a difference. ECMAScript has a superset of that behavior being multi-paradigm: >> >> let newObject = Object.create(oldObject) > > Eh? oldObject is the prototype object of newObject. > > newObject and oldObject have different prototype objects; newObject > can't be a clone of oldObject. You may prefer let newObject = Object.assign({}, oldObject); -- Christoph M. Becker