Path: csiph.com!news.fcku.it!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: Object oriented programming Date: Sun, 7 Jan 2018 12:40:28 +0100 Organization: solani.org Lines: 37 Message-ID: References: <3c2333ff-00fe-4087-ab49-f52d0546b29b@googlegroups.com> <41aa51ac-693c-44ab-9bae-db0b661ba9df@googlegroups.com> <431c000b-abb7-4dc1-a692-35d29b6f9456@googlegroups.com> <409a0b82-3074-4c3e-96a3-5c03c25037f9@googlegroups.com> <87a7xq6g01.fsf@bsb.me.uk> <15e4e78b-a7fa-42b9-bee4-f8a869c11b24@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1515325224 12753 eJwFwQkBACAIBLBKCPLFETj6R3BTsWPt19Surm4rzIjzLZwYMTgWdplzT9SLbB6YLJR0S1Nmbh9/MjVBvKiuQiRf1naB9BTUk2eE4tEHrzsfIA== (7 Jan 2018 11:40:24 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sun, 7 Jan 2018 11:40:24 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 In-Reply-To: <15e4e78b-a7fa-42b9-bee4-f8a869c11b24@googlegroups.com> Content-Language: de-DE X-User-ID: eJwFwQkBACAIBLBKIHBKHN7+EdxMwKirMKitLS83Rpqwhpc+ceaAunSf02aEouVO+0nh0g8oVBGR X-NNTP-Posting-Host: eJwNykkBwDAIBEBLkMAS5HD6l9DOe/SCUSZQiK7umyetKA7BIeX12qGk1OggeCV8rQszvhcno2xOqKfs1TvENO7FFfw3WL+9tvTynaPT+wHCZR9V Cancel-Lock: sha1:kAr/hoROqix5XkR1kcSa0d+Nm1g= Xref: csiph.com comp.lang.javascript:34495 On 06.01.2018 at 22:28, Julio Di Egidio wrote: > On Saturday, January 6, 2018 at 10:11:22 PM UTC+1, Christoph M. Becker wrote: > >> | Note: As of ES2015, JavaScript arguably got methods > > Was that the point? Should I find another "third-party" blog entry about > how the new standard is even worse than what we had? Indeed, instead of > fixing it, they have been making it worse, and just in order to please "the > community" and the very bias towards object orientation. Marketers. JS the > most abused and misunderstood language ever. And it's a shame, as, besides > the ubiquity, it's fundamentally a wonderful language... I agree that functional programming in ECMAScript implementations is still underrated, and I understand why some prefer and advocate functional programming over object oriented programming. However, that does not mean that these languages are not object-oriented, even though it is possible to program non-trivial and even complex algorithms without applying the object-oriented paradigm (most notably, mutation of object state). One may even argue that ECMAScript has no first-class functions, since functions are nothing more than callable objects. With regard to function vs. method: as I see it, this distinction is useful in these languages, but not so much as specified by Ecma ("A function that is associated with an object via a property is called a method."), but rather when referring to the possibility that the function/method uses the implicit `this` reference. Along these lines, `Array.prototype.map` would be a method, but `R.map`[1] would be a function. BTW: I would suggest to avoid explicit language, at least in public discussions. :) [1] -- Christoph M. Becker