Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Overriding function and adding a bit Date: Sun, 14 May 2017 12:34:06 +0100 Organization: A noiseless patient Spider Lines: 53 Message-ID: <87pofbbrkh.fsf@bsb.me.uk> References: <20479369.6Emhk5qWAg@PointedEars.de> <10849548.O9o76ZdvQC@PointedEars.de> <05f57f29-8dd8-4829-9952-7ffd20411fb5@googlegroups.com> <877f1kg4mz.fsf@bsb.me.uk> <579d836f-190f-488b-859a-2d1320aa8242@googlegroups.com> <878tm0edlc.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="4567f39464f93982416bb7b5de1a8617"; logging-data="10630"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19skKxbd0f6E14J4wAwCypRN4m3DyaHPqM=" Cancel-Lock: sha1:zKdBR5O/16aQVfoimvBzFsyROgs= sha1:ltw3pE0k2eIIRHSjVGwt6uadcQE= X-BSB-Auth: 1.58a8cd2935e1e38b2afd.20170514123406BST.87pofbbrkh.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:33317 John G Harris writes: > On 13 May 2017 20:51:57 GMT, ram@zedat.fu-berlin.de (Stefan Ram) > wrote: > >>Ben Bacarisse writes: >>>There can be no reasonable doubt that ECMAScript is an object-oriented >>>language >> >> Alan Kay coined the term »object-oriented« in 1967, >> and he wrote to me in an e-mail in 2003: >> >>»OOP to me means only messaging, local retention and protection and >>hiding of state-process, and extreme late-binding of all things. >>It can be done in Smalltalk and in LISP. There are possibly >>other systems in which this is possible, but I'm not aware of them.« >> >> JavaScript already existed in 2003, but Alan Kay did not >> mention it as a System in which OOP can be done. > > In a video by one of the Smalltalk inventors, probably Alan Kay, the > speaker ended by saying that a language is Object Oriented *ONLY* if > it has *ALL* the features of Smalltalk. > > So > Strongly typed languages are not OO. > Languages where a garbage collector is optional are not OO. > Languages which don't call methods by sending messages are not OO. > > I think he was biased in favour of Smalltalk, too biased. Sure, but I don't think it matters too much because he's explicit about the definition he's using (or, indeed, invented) so the discussion can't be derailed by misunderstanding. I like it when people are passionate about technical matters, and I like having definitions that stake out the boundaries of concepts like this, even if they are not universally agreed upon. And I feel inclined to nit-pick a bit: I think you mean "static typing" rather than "strong typing". What he's ruling out is code where the types can be resolved by static analysis of the program text. A language with dynamic or run-time types may enforce strong type checking. In fact, I think he's going further than this. His remark about very late binding would rule out languages (like C++) where the compiler can plant virtual tables making it seem like there is some run-time typing going on. The acid test would be whether you can "wrap" a method at run-time. You can do this in SmallTalk and CLOS (the Common List Object System) and in Python as well. -- Ben.