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: ECMAScript and classes Date: Thu, 23 Oct 2014 18:37:40 +0200 Organization: solani.org Lines: 42 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1414082251 28612 eJwNwgERwDAIA0BLdEmgyCll+Jew/b3gy2/Q5dRo/BkKpyqhOOx35e4oTpEjGBlhsv4jE/gAFHAQSA== (23 Oct 2014 16:37:31 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 23 Oct 2014 16:37:31 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 X-User-ID: eJwFwQkBACAIBLBK8h0QBxT6R3AzAeG6wqC2tuyR8uYmN6trxQJ9zHm0abrOpMGRj6Vqgj4SvBDd In-Reply-To: Cancel-Lock: sha1:XK7JhYBkkC/QrYyK7bDHMV88nfg= X-NNTP-Posting-Host: eJwNysEBwCAIA8CVREhkHaDN/iPovQ9O45wgGBDkX1fF/E4pA91L6DiTY7B+a5K5C3zVdq4LMGURAA== Xref: csiph.com comp.lang.javascript:25978 John Harris wrote: > On Tue, 21 Oct 2014 13:27:38 +0200, "Christoph M. Becker" > wrote: > >> Edition >> 5.1 (or maybe 5 already) introduced Object.seal()[1] which can be >> applied to the prototype object. > > It wouldn't be just the prototype object. It would be all the > user-defined objects in the prototype chain and each class instance > object as it is created. Usually you wouldn't seal the class instances, though, but rather prevent their extension and maybe remove the configurable attribute on the individual properties. > All of which has to done by the Poor Old > Programmer, of course. The "Poor Old Programmer" could, however, write a function that does all this for him. >> Ecma-262 Edition 6 might introduce >> "maximally minimal" classes[2] and private name objects[3] which would >> provide better support for classes in the classical sense. > > > The current draft ES6 allows only one constructor function per class. This restriction applies to several object-oriented programming languages with classical inheritance. > So, ES6 will likely still only provide partial *support* for classes, > while still allowing full *implementation* of classes as before. What would be full *support* for classes. Isn't multiple inheritance an important concept, for instance, which is only supported by very few languages? What about multiple dispatch? -- Christoph M. Becker