Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Not understanding OOP stuff Date: Mon, 24 Jul 2017 03:49:42 +0100 Organization: A noiseless patient Spider Lines: 31 Message-ID: <87a83ur1kp.fsf@bsb.me.uk> References: <1914438.irdbgypaU6@PointedEars.de> <02ec6752-8a2d-4116-9396-71d36dcbd579@googlegroups.com> <87k22zrmtj.fsf@bsb.me.uk> <3298850e-dce6-4384-af58-8bb58830960f@googlegroups.com> <87379msw5i.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="ca27eb692c41fad091d6d60e0c170737"; logging-data="28881"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/QzRzJS9dwLKxGNfrVoPuyLcxnxVgrIQo=" Cancel-Lock: sha1:F9jKYK7YEVtgOkixrGGb6+eenjE= sha1:VopQTU91sj812jZQKxf8lj80wFA= X-BSB-Auth: 1.4830cc884ab6c581c260.20170724034942BST.87a83ur1kp.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:33632 ram@zedat.fu-berlin.de (Stefan Ram) writes: > Ben Bacarisse writes: >>The interesting things are the concepts not the names. ECMAScript >>supports many of the concepts that people like Alan Kay would say are >>essential to being object-oriented. It supports local retention and >>hiding of state along with extreme late binding, but it does not use >>message passing as the communication between objects.ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ > ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ > Why can't I say that when the JavaScript expression > > o.m() > > is being evaluated, "the call message ğm()Ğ is being > sent to the object ğoĞ"ı? You certainly can. I don't like to say that but it's very far from being objectively wrong to do so. > How do you define ğmessage passingĞ, and which part > of your definition is not fulfilled by ECMAScript? For me, a message should be a thing in itself (in Smalltalk messages are, conceptually, objects though almost always optimised away). You should be able, when required, to build one at run-time and store it for later sending to an object. A natural consequence of that would be the ability of an object to forward a message to some other object. -- Ben.