Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #34811 > unrolled thread

Trying to create array of object literals

Started bybit-naughty@hotmail.com
First post2018-04-12 12:17 -0700
Last post2018-04-13 04:08 -0700
Articles 20 on this page of 81 — 12 participants

Back to article view | Back to comp.lang.javascript


Contents

  Trying to create array of object literals bit-naughty@hotmail.com - 2018-04-12 12:17 -0700
    Re: Trying to create array of object literals bit-naughty@hotmail.com - 2018-04-12 12:26 -0700
    Re: Trying to create array of object literals Maik Koenig <usenetspam@maikkoenig.de> - 2018-04-12 21:47 +0200
    Re: Trying to create array of object literals Julio Di Egidio <julio@diegidio.name> - 2018-04-12 12:49 -0700
    Re: Trying to create array of object literals Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-13 10:27 +0200
      Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-13 10:57 +0100
        Re: Trying to create array of object literals Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-13 23:38 +0200
          Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-14 11:22 +0100
            Re: Trying to create array of object literals Julio Di Egidio <julio@diegidio.name> - 2018-04-14 07:25 -0700
              Re: Trying to create array of object literals Julio Di Egidio <julio@diegidio.name> - 2018-04-14 09:09 -0700
                Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-16 09:43 +0100
                  Re: Trying to create array of object literals Julio Di Egidio <julio@diegidio.name> - 2018-04-16 02:04 -0700
                  Re: Trying to create array of object literals "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-04-16 11:23 +0200
                    Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-16 19:32 +0100
                      Re: Trying to create array of object literals "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-04-17 23:37 +0200
                        Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-18 16:18 +0100
                          Re: Trying to create array of object literals "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-04-19 23:08 +0200
                            Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-20 10:17 +0100
                              Re: Trying to create array of object literals "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-04-20 12:45 +0200
                                Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-20 19:08 +0100
                Re: Trying to create array of object literals "c.l.js" <trollhunter@curiosity.kills.no> - 2018-04-20 17:04 -0300
                  Re: Trying to create array of object literals Julio Di Egidio <julio@diegidio.name> - 2018-04-20 13:15 -0700
                  Is JS a functional programming language? (was: Trying to create array of object literals) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-21 02:35 +0200
                    Re: Is JS a functional programming language? (was: Trying to create array of object literals) Julio Di Egidio <julio@diegidio.name> - 2018-04-21 01:36 -0700
                      Re: Is JS a functional programming language? (was: Trying to create array of object literals) "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-04-21 11:46 -0700
                        Re: Is JS a functional programming language? (was: Trying to create array of object literals) "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-04-21 11:48 -0700
                        Re: Is JS a functional programming language? (was: Trying to create array of object literals) Julio Di Egidio <julio@diegidio.name> - 2018-04-21 23:53 -0700
                          Re: Is JS a functional programming language? (was: Trying to create array of object literals) "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-04-22 10:33 -0700
                            Re: Is JS a functional programming language? (was: Trying to create array of object literals) Julio Di Egidio <julio@diegidio.name> - 2018-04-23 00:27 -0700
                              Re: Is JS a functional programming language? (was: Trying to create array of object literals) "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-04-23 11:50 -0700
                                Re: Is JS a functional programming language? (was: Trying to create array of object literals) Julio Di Egidio <julio@diegidio.name> - 2018-04-23 12:00 -0700
                                  Re: Is JS a functional programming language? (was: Trying to create array of object literals) "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-04-23 15:07 -0700
                                    Re: Is JS a functional programming language? "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-04-24 00:47 +0200
                                      Re: Is JS a functional programming language? Julio Di Egidio <julio@diegidio.name> - 2018-04-23 16:12 -0700
                                        Re: Is JS a functional programming language? "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-04-24 01:30 +0200
                                      Re: Is JS a functional programming language? Julio Di Egidio <julio@diegidio.name> - 2018-04-23 16:45 -0700
                                      Re: Is JS a functional programming language? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-24 09:54 +0100
                                        Re: Is JS a functional programming language? Tim Streater <timstreater@greenbee.net> - 2018-04-24 10:17 +0000
                                      Re: Is JS a functional programming language? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-04-24 12:02 -0700
                                        Re: Is JS a functional programming language? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-25 05:04 +0200
                                          Re: Is JS a functional programming language? Julio Di Egidio <julio@diegidio.name> - 2018-04-25 02:16 -0700
                                            Re: Is JS a functional programming language? Julio Di Egidio <julio@diegidio.name> - 2018-04-25 02:20 -0700
                                            Re: Is JS a functional programming language? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-25 18:22 +0100
                                              Re: Is JS a functional programming language? Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-04-25 17:25 +0000
                                              Re: Is JS a functional programming language? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-04-25 14:50 -0700
                                          Re: Is JS a functional programming language? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-04-25 14:39 -0700
                                            Re: Is JS a functional programming language? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-29 20:44 +0200
                                              Re: Is JS a functional programming language? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-04-29 13:45 -0700
                    Re: Is JS a functional programming language? "c.l.js" <trollhunter@curiosity.kills.no> - 2018-04-21 19:51 -0300
                      Re: Is JS a functional programming language? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-22 01:18 +0200
                        Re: Is JS a functional programming language? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-22 02:19 +0200
                          Re: Is JS a functional programming language? "Mark-" <nospam@mapson.xyz> - 2018-04-22 01:52 +0000
                            Re: Is JS a functional programming language? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-22 04:30 +0200
                              Re: Is JS a functional programming language? "Mark-" <nospam@mapson.xyz> - 2018-04-22 02:45 +0000
                                Re: Is JS a functional programming language? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-22 05:55 +0200
                                  Re: Is JS a functional programming language? "Mark-" <nospam@mapson.xyz> - 2018-04-22 04:04 +0000
                                    Re: Is JS a functional programming language? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-04-22 10:59 +0200
                                      Re: Is JS a functional programming language? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-22 11:03 +0100
                                        Re: Is JS a functional programming language? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-04-22 12:50 +0200
                                          Re: Is JS a functional programming language? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-23 09:19 +0100
                                      Re: Is JS a functional programming language? "Mark-" <nospam@mapson.xyz> - 2018-04-22 12:58 +0000
              Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-16 10:02 +0100
                Re: Trying to create array of object literals Julio Di Egidio <julio@diegidio.name> - 2018-04-16 02:05 -0700
                  Re: Trying to create array of object literals "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-04-16 11:27 +0200
                    Re: Trying to create array of object literals Julio Di Egidio <julio@diegidio.name> - 2018-04-16 02:33 -0700
                      Re: Trying to create array of object literals "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-04-16 14:03 +0200
                      Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-16 19:40 +0100
                        Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-17 09:45 +0100
                        Re: Trying to create array of object literals Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-18 03:25 +0200
                          Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-18 15:50 +0100
                          Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-18 16:08 +0100
                            Re: Trying to create array of object literals Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-19 03:34 +0200
                              Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-19 10:37 +0100
                          Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-19 19:02 +0100
                        Re: Trying to create array of object literals Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-19 03:25 +0200
                  Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-16 19:37 +0100
                    Re: Trying to create array of object literals Julio Di Egidio <julio@diegidio.name> - 2018-04-16 11:48 -0700
                      Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-17 09:52 +0100
                        Re: Trying to create array of object literals Julio Di Egidio <julio@diegidio.name> - 2018-04-17 03:22 -0700
                          Re: Trying to create array of object literals John G Harris <niam@jghnorth.org.uk.invalid> - 2018-04-17 18:28 +0100
      Re: Trying to create array of object literals bit-naughty@hotmail.com - 2018-04-13 04:08 -0700

Page 3 of 5 — ← Prev page 1 2 [3] 4 5  Next page →


#34916 — Re: Is JS a functional programming language?

FromJulio Di Egidio <julio@diegidio.name>
Date2018-04-25 02:16 -0700
SubjectRe: Is JS a functional programming language?
Message-ID<e577d58f-7b07-4563-8ca1-e51833255e8c@googlegroups.com>
In reply to#34915
On Wednesday, 25 April 2018 05:04:25 UTC+2, Thomas 'PointedEars' Lahn  wrote:

> AISB, the key property of a functional programming language is that 
> “functions are first-class objects”.

And I have already told you that there is more than that:
functional is about *lexical* *bottom-up* *substitution*.

Julio

[toc] | [prev] | [next] | [standalone]


#34917 — Re: Is JS a functional programming language?

FromJulio Di Egidio <julio@diegidio.name>
Date2018-04-25 02:20 -0700
SubjectRe: Is JS a functional programming language?
Message-ID<b05c03db-4871-49c1-8f6c-4d71ea7b3e7e@googlegroups.com>
In reply to#34916
On Wednesday, 25 April 2018 11:16:42 UTC+2, Julio Di Egidio  wrote:
> On Wednesday, 25 April 2018 05:04:25 UTC+2, Thomas 'PointedEars' Lahn  wrote:
> 
> > AISB, the key property of a functional programming language is that 
> > “functions are first-class objects”.
> 
> And I have already told you that there is more than that:
> functional is about *lexical* *bottom-up* *substitution*.

As well as I have already mentioned that it's closures, not just functions.

How fucking stupid you too are?  I said "someone else might be able to say it
better" just because *I* am super conscious of specialisations and subtleties,
not because that was far from the point and certainly not because you moron can
feel safe ignoring it.  Stop being a bunch of retarded asses, you all.

Julio

[toc] | [prev] | [next] | [standalone]


#34918 — Re: Is JS a functional programming language?

FromJohn G Harris <niam@jghnorth.org.uk.invalid>
Date2018-04-25 18:22 +0100
SubjectRe: Is JS a functional programming language?
Message-ID<l9e1edhlbec1d24pkp7gu9ifppf88dqflu@4ax.com>
In reply to#34916
On Wed, 25 Apr 2018 02:16:34 -0700 (PDT), Julio Di Egidio
<julio@diegidio.name> wrote:

>On Wednesday, 25 April 2018 05:04:25 UTC+2, Thomas 'PointedEars' Lahn  wrote:
>
>> AISB, the key property of a functional programming language is that 
>> “functions are first-class objects”.
>
>And I have already told you that there is more than that:
>functional is about *lexical* *bottom-up* *substitution*.

Unfortunately, functional languages are useless. They can't be used to
control a petrol pump. They can't be used to control bank accounts.
They can't be used to fly an aeroplane. And they can't be used to
manipulate the display of a web page.

Because if they could they wouldn't be functional languages.

  John

[toc] | [prev] | [next] | [standalone]


#34919 — Re: Is JS a functional programming language?

FromJon Ribbens <jon+usenet@unequivocal.eu>
Date2018-04-25 17:25 +0000
SubjectRe: Is JS a functional programming language?
Message-ID<slrnpe1eh2.441.jon+usenet@sable.unequivocal.eu>
In reply to#34918
On 2018-04-25, John G Harris <niam@jghnorth.org.uk.invalid> wrote:
> Unfortunately, functional languages are useless. They can't be used to
> control a petrol pump. They can't be used to control bank accounts.
> They can't be used to fly an aeroplane. And they can't be used to
> manipulate the display of a web page.
>
> Because if they could they wouldn't be functional languages.

Are you saying... functional languages are non-functional? ;-)

[toc] | [prev] | [next] | [standalone]


#34922 — Re: Is JS a functional programming language?

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2018-04-25 14:50 -0700
SubjectRe: Is JS a functional programming language?
Message-ID<22c706d6-f99c-46d0-8e00-e5419b6ee5b5@googlegroups.com>
In reply to#34918
John G Harris wrote:

> Unfortunately, functional languages are useless. They can't be used to
> control a petrol pump. They can't be used to control bank accounts.
> They can't be used to fly an aeroplane. And they can't be used to
> manipulate the display of a web page.
> 
> Because if they could they wouldn't be functional languages.

Are you referring to immutability? Erik Meijer had an excellent write-up on this you might enjoy:

"The Curse of the Excluded Middle: 
'Mostly functional' programming does not work."

<https://queue.acm.org/detail.cfm?id=2611829>

[toc] | [prev] | [next] | [standalone]


#34921 — Re: Is JS a functional programming language?

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2018-04-25 14:39 -0700
SubjectRe: Is JS a functional programming language?
Message-ID<2b542d73-0446-4a88-afa0-5662de1e35d6@googlegroups.com>
In reply to#34915
Thomas 'PointedEars' Lahn wrote:
> Michael Haufe (TNO) wrote:
> 
> > The main point I was setting up with Julio was that Object-Oriented and
> > Functional programming are duals[1] of each other […]
> > 
> > [1] <https://en.wikipedia.org/wiki/Duality_(mathematics)>
> 
> 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

I don't think you can include any version of VB in the category of Pure OOP. Every one of them I've seen has procedural constructs. For example, compare the solutions of Smalltalk and Visual Basic :

<http://rosettacode.org/wiki/Sieve_of_Eratosthenes#Visual_Basic>
<http://rosettacode.org/wiki/Sieve_of_Eratosthenes#Smalltalk>

'if/then/else' would be methods of boolean in a pure OO. Also IIRC, 'Nothing' in VB has never been an object. 

Regarding the first part of your paragraph, I'm not sure we're on the same page yet so I don't know if I agree/disagree. Here is the duality I'm referring to (building on my earlier examples [1]) 

/* Functional */
If I want to add a new operation, such as isValue(exp) to the functional example it's easy and I don't have to modify anything to implement it.

But if I want to add a new Exp type such a Mul(left,right) then I have a problem. All operations have to be updated to support this new case. 

/* OO */
Same example. If I want to add the new Exp type Mul(left,right) then it's easy.
Just extend the Exp type and implement the specific methods.

But if I want to add that new operation: Exp.isValue() then I have a different problem. All of my existing data types have to be touched to support this new method.

Summary:


      New Operations | New Data
FP        Easy       |  Hard
OOP       Hard       |  Easy


This is the duality I'm referring to.

Yes, it's possible for them to emulate each other, but in those emulations
I'm claiming you are making things even more complicated.

For instance, in OOP to make new operations easy you utilize the Visitor Pattern, in FP you have Type Classes, or explicit records you thread through all of your functions.


[1] <https://groups.google.com/d/msg/comp.lang.javascript/9FxKCWG7NLQ/iXVPdwuaCgAJ>


> 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]

Yes, I know what this means. An interesting exercise (if you've ever tried it), is to try and emulate functional programming in C. What I ended up doing was managing my own lookup table of procedure references in order to not just pass the references but emulate partial application. Turned into a nightmare to maintain, but interesting to try anyway.  

> 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.  

aka. Function Composition is more important than Function Application.
Take that to the extreme and you don't even have values in the language anymore. 
If you can represent values and functions then everything is truly a function. 
But this isn't a "Functional" Programming Language anymore. This would be called a Function Level language and it's an old idea (John Backus's FP language).

I used to be a major fan of this for a couple years. The modern term for this paradigm is Concatenative, there is/was an active community around it: 

<http://concatenative.org>
<https://groups.yahoo.com/neo/groups/concatenative/conversations/topics>

And a good intro: <https://web.archive.org/web/20111007025545/http://www.latrobe.edu.au:80/phimvt/joy/j00rat.html>


> Also, it is not always helpful or correct to migrate mathematic terminology 
> to other fields; in this case it certainly is not.

Duality is a well known concept in PLT, I accept the blame for not expressing that concept better. Wikipedia is admittedly not a good reference for this, but I don't have a better one that doesn't require some prerequisite knowledge. The following shot paper is better though: 

<https://www.researchgate.net/publication/228975512_Dualities_in_Programming_Languages>

[toc] | [prev] | [next] | [standalone]


#34933 — Re: Is JS a functional programming language?

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2018-04-29 20:44 +0200
SubjectRe: Is JS a functional programming language?
Message-ID<dab4585f-e4e7-a5d7-e506-37c452908dc1@PointedEars.de>
In reply to#34921
Michael Haufe (TNO) wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Michael Haufe (TNO) wrote:
>> > The main point I was setting up with Julio was that Object-Oriented and
>> > Functional programming are duals[1] of each other […]
>> >
>> > [1] <https://en.wikipedia.org/wiki/Duality_(mathematics)>
>> 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
>
> I don't think you can include any version of VB in the category of Pure
> OOP. Every one of them I've seen has procedural constructs.

Semantic fallacy and /argumentum ad ignorantiam/.

When I am distinguishing “pure object-oriented” and “pure functional”
programming languages, I am of course referring to the fact that one
set has none of the *key* properties of the other.

> For example, compare the solutions of Smalltalk and Visual Basic :
>
> <http://rosettacode.org/wiki/Sieve_of_Eratosthenes#Visual_Basic>

There is “Debug.Print”, is there not?

> <http://rosettacode.org/wiki/Sieve_of_Eratosthenes#Smalltalk>
>
> 'if/then/else' would be methods of boolean in a pure OO.

Utter nonsense.

> Also IIRC, 'Nothing' in VB has never been an object.

Irrelevant.

> [tl;dr yet]

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#34936 — Re: Is JS a functional programming language?

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2018-04-29 13:45 -0700
SubjectRe: Is JS a functional programming language?
Message-ID<6607b3be-81f5-4ca7-99a6-65ed1c6bb745@googlegroups.com>
In reply to#34933
Thomas 'PointedEars' Lahn wrote:
> Michael Haufe (TNO) wrote:

 [...]

> > I don't think you can include any version of VB in the category of Pure
> > OOP. Every one of them I've seen has procedural constructs.
> 
> Semantic fallacy and /argumentum ad ignorantiam/.
> 
> When I am distinguishing “pure object-oriented” and “pure functional”
> programming languages, I am of course referring to the fact that one
> set has none of the *key* properties of the other.

If we disagree on the definition of "Pure", then fair enough. The definition I use for "Pure" is the lack of mutable state in addition to the key properties you mentioned.

"Pure" OOP doesn't have a commonly accepted equivalent definition, though I refer to it as also meaning a lack of side-effects (Admittedly a minority opinion). The community definition (SmallTalk, Self, Ruby, etc.) is more-so "Pure" as meaning "Purely" OOP where every construct in the language is an object or a method/message of that object. This difference is what I was showing with the Rosetta Code comparison
 
> > For example, compare the solutions of Smalltalk and Visual Basic :
> >
> > <http://rosettacode.org/wiki/Sieve_of_Eratosthenes#Visual_Basic>
> 
> There is “Debug.Print”, is there not?

What's your point? 

> > <http://rosettacode.org/wiki/Sieve_of_Eratosthenes#Smalltalk>
> >
> > 'if/then/else' would be methods of boolean in a pure OO.
> 
> Utter nonsense.

Based on my earlier definition, hardly. Example:

<script type="SmallTalk">
  a < b
    ifTrue: [^'a is less than b']
    ifFalse: [^'a is greater than or equal to b']
</script>

<script type="VB.NET>
  If (a < b) Then
    Return "a is less than b"
  Else
    Return "a is greater than or equal to b"
  End If
</script>

> > Also IIRC, 'Nothing' in VB has never been an object.
> 
> Irrelevant.

Relevant per above.

> > [tl;dr yet]

No rush. It will be awhile before I can dedicate time to read another response properly.

[toc] | [prev] | [next] | [standalone]


#34887 — Re: Is JS a functional programming language?

From"c.l.js" <trollhunter@curiosity.kills.no>
Date2018-04-21 19:51 -0300
SubjectRe: Is JS a functional programming language?
Message-ID<pbgf9p$aij$1@gioia.aioe.org>
In reply to#34883
A Troll called Thomas 'PointedEars' Lahn wrote:
> 
>> Julio Di Egidio babbled:
>>> JS is a *functional* language: the modularity is modularity of *lexical*
>>> constructs and contexts...  (Someone else might be able to say it
>>> better.)
> 
> Modularity is not the key property of a functional programming language.
>   

I already knew another troll would drop by to back their pal up. LOL

JavaScript is a multi-paradigm language, but the resident moron called 
Julio insists that JavaScript is a functional programming language just 
because it offers the possibility of using the functional programming 
paradigm. In JavaScript, functions are first-class *objects*. You won't 
find prototype-based or procedural-imperative paradigms in pure 
functional programming languages. Period. Stop spreading bullshit and 
fuck off!

--
TH

[toc] | [prev] | [next] | [standalone]


#34888 — Re: Is JS a functional programming language?

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2018-04-22 01:18 +0200
SubjectRe: Is JS a functional programming language?
Message-ID<12503549.nl7q7Es1eF@PointedEars.de>
In reply to#34887
c.l.js wrote:
^^^^^^
I take it that you do want to be reported for network abuse.  Can do!

> A Troll called Thomas 'PointedEars' Lahn wrote:
>>> Julio Di Egidio babbled:
>>>> JS is a *functional* language: the modularity is modularity of
>>>> *lexical*
>>>> constructs and contexts...  (Someone else might be able to say it
>>>> better.)
>> Modularity is not the key property of a functional programming language.
> 
> I already knew another troll would drop by

You are the only troll here.  Evidence is marked below.

> to back their pal up. LOL

You have not the slightest clue what you are talking about.  For how long 
have you been reading the newsgroup, a week or so?  The record shows that 
Julio Di Egidio and I are anything *but* pals.  In fact, I had him killfiled 
a long time ago (which is why I posted a follow-up to your posting, not 
his).

That does not change the fact that he is *correct* in his choice of 
terminology there.
 
> JavaScript is a multi-paradigm language, but the resident moron called
                                                   ^^^^^^^^^^^^^^
> Julio insists that JavaScript is a functional programming language just
> because it offers the possibility of using the functional programming
> paradigm.

And that is where he is *correct*.

> In JavaScript, functions are first-class *objects*.

If you had read more carefully, you would have realized that the term 
“first-class object” does _not_ imply object-oriented programming.

> You won't find prototype-based or procedural-imperative paradigms in pure
> functional programming languages.

But there is a difference between a functional programming language (like 
ECMAScript implementations), where the functional programming paradigm can 
be used, and a *pure* functional programming language (like Haskell), where 
*only* the functional programming paradigm (and related paradigms) can be 
used.

> Period. Stop spreading bullshit

Yeah, have you looked into a mirror lately?

<https://www.crockford.com/javascript/javascript.html>

> and fuck off!

Read my signature, ignoramus.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#34889 — Re: Is JS a functional programming language?

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2018-04-22 02:19 +0200
SubjectRe: Is JS a functional programming language?
Message-ID<2579441.nDJ51ryLS1@PointedEars.de>
In reply to#34888
Ship’s log, supplemental…

Thomas 'PointedEars' Lahn wrote:

> <https://www.crockford.com/javascript/javascript.html>

JFTR: I do not agree with much that Crockford claims there (maybe I will add 
my remarks on it some day), but the point I wanted to make with this 
reference is where he is correct there: “JavaScript”, if you understand that 
to mean all ECMAScript implementations (and you should not; Crockford 
*oversimplifies* there), is “Lisp in C's Clothing” indeed.

In fact, Brendan Eich, creator of (Netscape) JavaScript, wrote *verbatim* in 
his 2008 blog entry that he “was recruited to Netscape with the promise of 
‘doing Scheme’ in the browser”.  Scheme, too, supports both imperative and 
functional programming as it was influenced by Lisp, and is described as one 
of the main dialects of Lisp (the other being Common Lisp).

<https://brendaneich.com/2008/04/popularity/>
<https://en.wikipedia.org/wiki/Scheme_(programming_language)>

Also, ECMAScript and its implementations ActionScript (Macromedia/Adobe in 
Flash), ECMAScript for XML (formerly, Mozilla in Firefox), JavaScript 
(Netscape et al. in various environments), and JScript (Microsoft in 
Internet Explorer, maybe also Edge)¹ are rightfully listed under

<https://en.wikipedia.org/wiki/List_of_programming_languages_by_type#Functional_languages>

in the “Impure” subsection, along with Lisp and Scheme.  (Whereas AISB, 
Haskell is rightfully listed in the “Pure” subsection.)

    [Not my doing this time, but good to see for a change, as Wikipedia
     unfortunately has a history of propagating misconceptions about
     ECMAScript.]

_______
¹  see also the ECMAScript Support Matrix (URI in the signature below)
-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#34890 — Re: Is JS a functional programming language?

From"Mark-" <nospam@mapson.xyz>
Date2018-04-22 01:52 +0000
SubjectRe: Is JS a functional programming language?
Message-ID<pbgptp$nih$1@gioia.aioe.org>
In reply to#34889
Thomas 'PointedEars' Lahn wrote:

>  ...as Wikipedia
>  unfortunately has a history of propagating misconceptions about
>  ECMAScript.

But you continue to use WP as a source. 

How is that "logical"? 

[toc] | [prev] | [next] | [standalone]


#34891 — Re: Is JS a functional programming language?

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2018-04-22 04:30 +0200
SubjectRe: Is JS a functional programming language?
Message-ID<2297695.15MFyOUcoh@PointedEars.de>
In reply to#34890
Mark- wrote:

> Thomas 'PointedEars' Lahn wrote:
>>  ...as Wikipedia unfortunately has a history of propagating
>>  misconceptions about ECMAScript.
> 
> But you continue to use WP as a source.

… if and when it is justified, i.e. there are supporting sources referred by 
the cited article (which is a requirement for Wikipedia content that lasts) 
or elsewhere to back it up (many Wikipedia articles provide excellent 
introductory material about a complex subject).
 
> How is that "logical"?

How is it not?  Your logic is flawed; it is the opposite of an /ipse dixit/ 
argument (which is a fallacy, too).

<https://en.wikipedia.org/wiki/Poisoning_the_well>

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#34892 — Re: Is JS a functional programming language?

From"Mark-" <nospam@mapson.xyz>
Date2018-04-22 02:45 +0000
SubjectRe: Is JS a functional programming language?
Message-ID<pbgsvi$rqs$1@gioia.aioe.org>
In reply to#34891
Thomas 'PointedEars' Lahn wrote:

>… if and when it is justified,

Right, you use WP when you agree with what is written.

> Your logic is flawed;

No, it is clear. That you fail to see the logic is something you should
consider working on. But you won't. :)

Good luck.

[toc] | [prev] | [next] | [standalone]


#34893 — Re: Is JS a functional programming language?

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2018-04-22 05:55 +0200
SubjectRe: Is JS a functional programming language?
Message-ID<1823586.8mRBVDsX5x@PointedEars.de>
In reply to#34892
Mark- trolled:

> Thomas 'PointedEars' Lahn wrote:
>> … if and when it is justified,
> 
> Right, you use WP when you agree with what is written.

That is _not_ what I said.

> […]

Score adjusted.
 
-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#34894 — Re: Is JS a functional programming language?

From"Mark-" <nospam@mapson.xyz>
Date2018-04-22 04:04 +0000
SubjectRe: Is JS a functional programming language?
Message-ID<pbh1kt$116p$1@gioia.aioe.org>
In reply to#34893
Thomas 'PointedEars' Lahn wrote:

> That is not what I said.

Not in those exact words but, in meaning.

> Mark- trolled:

It appears I struck a truth and you lost the debate.

[toc] | [prev] | [next] | [standalone]


#34896 — Re: Is JS a functional programming language?

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-04-22 10:59 +0200
SubjectRe: Is JS a functional programming language?
Message-ID<XnsA8CC6FC08D51Aeejj99@194.109.6.166>
In reply to#34894
"Mark-" <nospam@mapson.xyz> wrote on 22 Apr 2018 in comp.lang.javascript:

> Thomas 'PointedEars' Lahn wrote:
> 
>> That is not what I said.
> 
> Not in those exact words but, in meaning.

Nonsense, the meaning belongs to the one that says something.

>> Mark- trolled:
> 
> It appears I struck a truth and you lost the debate.

Since when needs a debate to be about winning,
when you are older than 7?

A debate is about expecting ideas that are not your own to begin with,
and entering ideas that are not the ones of the 'opponents'.

Incidentally you are bound to learn something.

So grow up all of you.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#34897 — Re: Is JS a functional programming language?

FromJohn G Harris <niam@jghnorth.org.uk.invalid>
Date2018-04-22 11:03 +0100
SubjectRe: Is JS a functional programming language?
Message-ID<r8noddl0peurev1fiv3pjrsv7gv9slvavg@4ax.com>
In reply to#34896
On Sun, 22 Apr 2018 10:59:08 +0200, "Evertjan."
<exxjxw.hannivoort@inter.nl.net> wrote:

  <snip>
>So grow up all of you.

  In spite of Evertjan saying earlier
>Will you stop ordering others what to do.
  :-)

  John

[toc] | [prev] | [next] | [standalone]


#34898 — Re: Is JS a functional programming language?

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-04-22 12:50 +0200
SubjectRe: Is JS a functional programming language?
Message-ID<XnsA8CC82A5BA372eejj99@194.109.6.166>
In reply to#34897
John G Harris <niam@jghnorth.org.uk.invalid> wrote on 22 Apr 2018 in 
comp.lang.javascript:

> On Sun, 22 Apr 2018 10:59:08 +0200, "Evertjan."
> <exxjxw.hannivoort@inter.nl.net> wrote:
> 
>   <snip>
>>So grow up all of you.
> 
>   In spite of Evertjan saying earlier
>>Will you stop ordering others what to do.

Not in spite of.

Ordering others what to do is also childish behavour.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#34903 — Re: Is JS a functional programming language?

FromJohn G Harris <niam@jghnorth.org.uk.invalid>
Date2018-04-23 09:19 +0100
SubjectRe: Is JS a functional programming language?
Message-ID<2n5rdd1a6hrv4nl7ibanbsuv60cj8q4apj@4ax.com>
In reply to#34898
On Sun, 22 Apr 2018 12:50:35 +0200, "Evertjan."
<exxjxw.hannivoort@inter.nl.net> wrote:

>John G Harris <niam@jghnorth.org.uk.invalid> wrote on 22 Apr 2018 in 
>comp.lang.javascript:
>
>> On Sun, 22 Apr 2018 10:59:08 +0200, "Evertjan."
>> <exxjxw.hannivoort@inter.nl.net> wrote:
>> 
>>   <snip>
>>>So grow up all of you.
>> 
>>   In spite of Evertjan saying earlier
>>>Will you stop ordering others what to do.
>
>Not in spite of.
>
>Ordering others what to do is also childish behavour.

So saying "Grow up all of you" is childish behaviour. I see.

  John

[toc] | [prev] | [next] | [standalone]


Page 3 of 5 — ← Prev page 1 2 [3] 4 5  Next page →

Back to top | Article view | comp.lang.javascript


csiph-web