Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: Can somebody explain this to me Date: Thu, 22 Jan 2015 13:27:34 +0100 Organization: solani.org Lines: 37 Message-ID: References: <1590597.KOVAYohEvS@PointedEars.de> <1761561.NWXpXnK3hu@PointedEars.de> <4ikqaa9iqmr7jd2qtiqhbsv47frcvjq12t@4ax.com> <1484912.4aj6z3n5JQ@PointedEars.de> <7dd0badq67nid10hcrgs0l2f5r7td12jbo@4ax.com> <92a91101-5f3d-4d1a-b76f-59df633d9642@googlegroups.com> <20o1cal0k4iue9ic55hafskt53sivk7lmg@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1421929647 29370 eJwNycEBwCAIA8CVRAjQcYTI/iPY+x7UxTvM4YbB1OyUBVUmWYroSDblr6+52vc9ZeIgpefcByjjEhw= (22 Jan 2015 12:27:27 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 22 Jan 2015 12:27:27 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 X-User-ID: eJwFwQkBwCAMA0BL/ZKscoCCfwm7Q9J5VAQLD28pvdHhDMddA60pmsG27mjD45tgq7OseH7/bg/h In-Reply-To: <20o1cal0k4iue9ic55hafskt53sivk7lmg@4ax.com> Cancel-Lock: sha1:WeU5JXFXNCpx9v2r6e1mkE4voYg= X-NNTP-Posting-Host: eJwFwQERACAIA8BK4BhQR+bRP4L/RHqqIpnB5YLzOMe73JYyMLR4FBpnVjDW9bYUb9aeDw8aEJE= Xref: csiph.com comp.lang.javascript:26648 John Harris wrote: > On Wed, 21 Jan 2015 13:00:59 -0800 (PST), Scott Sauyet > wrote: > >> John Harris wrote: >> >>> It might even dissuade people from calling ECMAScript a prototypal >>> language, which it clearly isn't. (Evidence : In a prototypal language >>> new objects are created by cloning existing prototype objects. >>> ECMAScript constructors do not clone.) >> >> You are confusing the specific (concatenative prototyping) with the >> general (prototyping). Javascript uses delegation-based prototyping >> instead. This is no less a form of prototyping than the concatenative >> one. > > C++ uses data structures that do the same job as prototype chains but > can't be modified by the program. C++ isn't called a prototypal > language. > > A C++ object uses the same function code for it's derived methods as > used by objects of the ancestor classes. C++ isn't said to use > delegation-based prototyping. > > I don't think prototype chains make the ECMAScript language(s) a > prototypal language (you don't say that, but others do). And calling > it delegation-based prototyping confuses and obscures what's really > going on. Well, have you consider that it's possible to create objects without using the `new` operator? Object.create() most certainly allows for prototypal programming. -- Christoph M. Becker