Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <3111771.G1ZtisqbPV@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Tue, 28 Jan 2014 23:23 +0100 User-Agent: KNode/4.11.3 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <1fe2e508-cfc8-4933-997b-9bb462a2a593@googlegroups.com> <4250784.k5hfLq1mn1@PointedEars.de> <2748480.FELbIWn90F@PointedEars.de> <2158405.4KzAjcCDC7@PointedEars.de> <4006284.34SQex3vo1@PointedEars.de> <52e7fbdd$0$9504$9b4e6d93@newsspool1.arcor-online.net> <2689391.ZCeiWr7303@PointedEars.de> <52e820d8$0$9517$9b4e6d93@newsspool1.arcor-online.net> MIME-Version: 1.0 Lines: 50 NNTP-Posting-Date: 28 Jan 2014 23:23:05 CET NNTP-Posting-Host: 46b76221.newsspool1.arcor-online.net X-Trace: DXC=Y_F]m53bYbM@Y=h<_c3PkHic==]BZ:afN4Fo<]lROoRAnkgeX?EC@@@E^]7Dg`Z:QJDZm8W4\YJNLYUVHKH;GI^GA:4gUTI10KA]`F2`gAdcNL X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:22864 Christoph Michael Becker wrote: > Thomas 'PointedEars' Lahn wrote: >> Christoph Michael Becker wrote: >>> I believe at least one of the arguments Michael has made, is that the >>> DOM defines interfaces, but not actual objects ("classes"), which can be >>> extended. While a particular DOM implementation might expose an Element >>> object, for instance, this is not mandatory. For that reason alone it >>> is not possible to reliably extend DOM objects (let alone the problem >>> that they are host objects, and ECMAScript leaves broad room for the >>> actual behavior of these), what may be regarded as (impedance) mismatch. >> >> That would be a specious argument, then. The very purpose, and the >> benefit, of an interface in OOP is that an object implementing it >> provides a well- defined minimum set of properties and methods, whereas >> how the methods are implemented is left to the object, allowing for, but >> not requiring, polymorphism. It is decidedly _not_ the purpose of an >> interface to be available itself as an object that can be extended; an >> interface is _not_ the same as a class. > > Of course. However, the DOM could have specified that for every > interface there has to be an according class (or a respective construct > according to the implementing language, such as a constructor function > for ECMAScript implementations) with the same name which implements the > interface. That would have changed it from being a language-neutral API into being a language-dependent one, at least. For example, DOM Level 3 Core specifies only a language binding for Java and ECMAScript, but keep in mind that the attributes, methods, and language bindings in the DOM Specifications are *inclusive*: ,- | | The Document Object Model is a platform- and language-neutral interface | that will allow programs and scripts to dynamically access and update the | content, structure and style of documents. […] ,- | | This specification defines the Document Object Model Core Level 3, a | platform- and language-neutral interface that allows programs and scripts | to dynamically access and update the content, structure and style of | documents. -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.