Path: csiph.com!weretis.net!feeder4.news.weretis.net!news.mb-net.net!open-news-network.org!.POSTED.25.234.197.178.dynamic.wless.lssmb00p-cgnat.res.cust.swisscom.ch!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Is JS a functional programming language? Date: Wed, 25 Apr 2018 05:04:17 +0200 Organization: PointedEars Software (PES) Lines: 42 Message-ID: <2432812.mvXUDI8C0e@PointedEars.de> References: <2ea2803e-c39d-40e0-b8ed-136c3dc9b4e0@googlegroups.com> <3364120.8dbtfUO1ph@PointedEars.de> <4mv0ddt3bre9bbiofnvabnbamlp9jfj072@4ax.com> <15901681.8V3EAehsKz@PointedEars.de> <3dd0b784-9634-4047-b79b-a171d1e1d099@googlegroups.com> <611cba1f-e8f1-4ca1-8eb5-5e10456200d1@googlegroups.com> <1703120.hZdRbIOfhN@PointedEars.de> <7a88c7d4-6343-4152-b0a0-0aea9859bfe5@googlegroups.com> <5bcea078-8dc0-4f8e-a730-2f93d925c781@googlegroups.com> <80de186b-13f0-45f6-a427-52e844db3edc@googlegroups.com> <63f44f57-f90f-43b3-b51a-8a9c30cea80c@googlegroups.com> <6aeacc78-ba24-4c5f-ab94-2d6fe1ad5d3f@googlegroups.com> <90aa23ab-ea8a-4fa9-8f5f-77e6a99211f8@googlegroups.com> <0ab002cd-34c4-4ace-86cc-dc4b583337ef@googlegroups.com> <6ac594f1-3d9b-4580-a14c-4bdac36558d2@googlegroups.com> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit Injection-Info: gwaiyur.mb-net.net; posting-host="25.234.197.178.dynamic.wless.lssmb00p-cgnat.res.cust.swisscom.ch:178.197.234.25"; logging-data="9858"; mail-complaints-to="abuse@open-news-network.org" User-Agent: KNode/4.14.2 Cancel-Lock: sha1:Y5GokTFGREv2l+Tx4qnj+UM/n5E= X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. The main point I was setting up with Julio was that Object-Oriented and > Functional programming are duals[1] of each other […] > > [1] But *that* is _not_ true. Because you can employ the object-oriented programming paradigm *without* employing the functional paradigm, and vice- versa. And there are, among implementations of those two paradigms, pure object-oriented programming languages (e.g., Visual Basic) as well as there are pure functional programming languages (e.g., Haskell). I happen to have used both, so I can confirm in that regard. AISB, the key property of a functional programming language is that “functions are first-class objects”. Superficialls that looks like a contradiction; but it _not_ because “first-class object” must be understood like “first-class citizen”: we are talking about objects/targets *of operations* there.[1] So the most fundamental operation that a functional programming language must allow is passing a (reference to a) function as an argument to another function. (ECMAScript implementations, like the various JavaScripts, allow that, as functions are specified and implemented as real *OOP* objects¹ and you can always pass references to objects as arguments of functions.) Also, it is not always helpful or correct to migrate mathematic terminology to other fields; in this case it certainly is not. _________ ¹ Functions have *properties*, a *constructor* (Function), a *prototype chain*, aso. [1] -- PointedEars FAQ: | | Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.