Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #34459 > unrolled thread
| Started by | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| First post | 2018-01-05 10:25 -0800 |
| Last post | 2018-01-09 13:19 +0100 |
| Articles | 20 on this page of 61 — 10 participants |
Back to article view | Back to comp.lang.javascript
Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-05 10:25 -0800
Re: Object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-01-05 11:51 -0800
Re: Object oriented programming Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-05 23:47 +0100
Re: Object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-01-05 15:15 -0800
Re: Object oriented programming Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-08 03:08 +0100
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-05 15:09 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-05 15:21 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-05 15:27 -0800
Re: Object oriented programming Julio Di Egidio <julio@diegidio.name> - 2018-01-05 12:09 -0800
Re: Object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-01-05 13:01 -0800
Re: Object oriented programming Julio Di Egidio <julio@diegidio.name> - 2018-01-05 14:38 -0800
Re: Object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-01-05 15:29 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-05 15:49 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-06 02:23 -0800
Re: Object oriented programming Julio Di Egidio <julio@diegidio.name> - 2018-01-06 03:25 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-06 03:39 -0800
Re: Object oriented programming Julio Di Egidio <julio@diegidio.name> - 2018-01-06 04:24 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-06 05:26 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-06 05:28 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-06 05:34 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-06 06:08 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-06 06:27 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-06 06:36 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-06 07:34 -0800
Re: Object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-01-06 09:56 -0800
Re: Object oriented programming John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-06 14:21 +0000
Re: Object oriented programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-01-06 17:42 +0000
Re: Object oriented programming Julio Di Egidio <julio@diegidio.name> - 2018-01-06 11:47 -0800
Re: Object oriented programming "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-01-06 22:11 +0100
Re: Object oriented programming Julio Di Egidio <julio@diegidio.name> - 2018-01-06 13:28 -0800
Re: Object oriented programming "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-01-07 12:40 +0100
Re: Object oriented programming "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-07 13:01 +0100
Re: Object oriented programming "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-01-07 19:43 +0100
Re: Object oriented programming "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-07 20:33 +0100
Re: Object oriented programming Julio Di Egidio <julio@diegidio.name> - 2018-01-07 08:30 -0800
Re: Object oriented programming John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-07 14:05 +0000
Re: Object oriented programming Julio Di Egidio <julio@diegidio.name> - 2018-01-07 08:33 -0800
Re: Object oriented programming John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-08 09:46 +0000
Re: Object oriented programming Julio Di Egidio <julio@diegidio.name> - 2018-01-08 03:45 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-06 03:39 -0800
Re: Object oriented programming Julio Di Egidio <julio@diegidio.name> - 2018-01-06 04:24 -0800
Re: Object oriented programming bit-naughty@hotmail.com - 2018-01-12 22:57 -0800
Re: Object oriented programming John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-13 13:27 +0000
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-13 08:24 -0800
Re: Object oriented programming John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-06 14:10 +0000
Re: Object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-01-06 23:54 -0800
Re: Object oriented programming John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-07 14:13 +0000
Re: Object oriented programming "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-01-07 15:26 +0100
Re: Object oriented programming John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-08 09:39 +0000
Re: Object oriented programming "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-01-09 00:12 +0100
Re: Object oriented programming Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-09 02:45 +0100
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-08 21:34 -0800
Re: Object oriented programming Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-09 12:52 +0100
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-09 04:41 -0800
Re: Object oriented programming Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-09 15:50 +0100
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-09 07:31 -0800
Re: Object oriented programming "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> - 2018-01-10 15:03 -0800
Re: Object oriented programming "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> - 2018-01-10 15:04 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-11 02:06 -0800
Re: Object oriented programming Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-09 09:50 -0800
Re: Object oriented programming "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-01-09 13:19 +0100
Page 2 of 4 — ← Prev page 1 [2] 3 4 Next page →
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-06 06:08 -0800 |
| Message-ID | <39f0263e-cbdc-434a-89d7-f37afd4b1db0@googlegroups.com> |
| In reply to | #34479 |
Den lördag 6 januari 2018 kl. 14:34:50 UTC+1 skrev Jonas Thörnvall:
> Den lördag 6 januari 2018 kl. 14:28:50 UTC+1 skrev Jonas Thörnvall:
> > Den lördag 6 januari 2018 kl. 14:26:27 UTC+1 skrev Jonas Thörnvall:
> > > Den lördag 6 januari 2018 kl. 13:24:58 UTC+1 skrev Julio Di Egidio:
> > > > On Saturday, January 6, 2018 at 12:39:55 PM UTC+1, Jonas Thörnvall wrote:
> > > > > Den lördag 6 januari 2018 kl. 12:25:13 UTC+1 skrev Julio Di Egidio:
> > > > > > On Saturday, January 6, 2018 at 11:23:16 AM UTC+1, Jonas Thörnvall wrote:
> > > > > > <snip>
> > > > > > > var inputs = midi.inputs.values();
> > > > > > >
> > > > > > > Is midi.input.values(); a function or a method?
> > > > > >
> > > > > > There are no methods in JS, only functions, in fact closures.
> > > > > > Then there are objects with properties, not attributes.
> > > > > >
> > > > > > Those properties, just like variables, can hold any value, including
> > > > > > references to functions (again, to closures), e.g.:
> > > > > >
> > > > > > myobj.func = function () { return dosomething(); };
> > > > > >
> > > > > > > How do i know the difference?
> > > > > >
> > > > > > RTFM? JS is notoriously the world's most misunderstood programming language
> > > > > > ever, OTOH a language spec as well as some good enough tutorials are not
> > > > > > that difficult to find really:
> > > > > >
> > > > > > <https://developer.mozilla.org/bm/docs/Web/JavaScript>
> > > > > >
> > > > > > > my.balls=jump
> > > > > > >
> > > > > > > I can't track down the meaning within the code?
> > > > > >
> > > > > > You cannot track the meaning of anything in that sense, i.e. by just
> > > > > > considering the rules of the language: readability (which includes
> > > > > > readable meaningfulness), just as correctness, is something we *strive*
> > > > > > for...
> > > > >
> > > > > But should one not be able to differentiate a function from a variable or
> > > > > from a listener. A value allocation from a function call?
> > > >
> > > > Not just by the name unless the programmer is using proper conventions, and
> > > > even then one should be careful when reviewing code, as generally very few
> > > > programmers can write decent code, but even the good programmers make
> > > > mistakes and are subject to fatigue.
> > > >
> > > > > Is this a value allocation or a function call.
> > > > >
> > > > > my.balls=jump;
> > > >
> > > > That is an *assignment*, dumbass. RTFM.
> > > >
> > > > *Plonk*
> > > >
> > > > Julio
> > >
> > > Really?????? Are you sure then why the fuck are there functions that never been called using those names?
> > >
> > > input.onmidimessage = echoMIDIMessage;
> > > input.value.onmidimessage = onMIDIMessage;
> > >
> > >
> > > If so why are there functions with those names?
> > >
> > > function onMIDIMessage (message) {
> > > midiToOutPort(message);
> > > }
> > >
> > > function echoMIDIMessage( event ) {
> > > if (output) {
> > > output.send( event.data, event.timestamp );
> > > }
> > > }
> > >
> > >
> > > eatmy.balls=dumbass
> >
> > Since you say they are assignments and not function calls, what are they doing?
> > input.onmidimessage = echoMIDIMessage;
> > input.value.onmidimessage = onMIDIMessage;
> > eatmy.balls=dumbass;
>
> Are you telling me echoMIDIMessage and onMIDIMessage are variables? If so where the fuck did they come from? And why would you assign a null variable to an input port? Or are they functions assigned to a port.
>
> You said they are assignments YES or NO?
Here is something relatable? OR?
But how the fuck am one supposed to guess that input is an object and onmidimessage an event attached to the object, and that onMIDIMessage is a function that will be called at the event onmidimessage by looking at it?
It is insane semantics, isn't it?
But it fucking get worse....
input.value.onmidimessage = onMIDIMessage;
Uuuuuuh what the fuck is value here?
I can't even guess that even though i have an example below, of an event upon an object trigger a function?
And why the fuck is the order object.event=function the linguistics of the shit you put together is so convoluted stupid in semantics one want to throw up on the shit, the only thing you managed to get right is string and array handling in javascript.
Of course it must be
ON punch OBJECT dumbass CALL out
Now you see i managed to get semantics that include it is
1. EVENT using ON and its name
2. OBJECT and its name
3. CALL a function or if you send parameters you can leave out CALL and use brackets.
Now we compare which is more readable
dumbass.punch=out
or
ON punch OBJECT dumbass CALL out
But the real dumbass prefer the punch to be an assigment.
As the other said you should assign a function.
Just wanted to point out that in this case you want to pass a value so you need to assign an anonymous function (or a named function defined inline) like
button.onclick = function() {otherfunction(parameter)};
If the function you want to assign does NOT require a parameter you can use it directly
button.onclick = otherfunction;
Note that there is no parenthesis in this case
button.onclick = otherfunction(); // this doesn't work
won't work as it will call otherfunction as soon as it is parsed
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-06 06:27 -0800 |
| Message-ID | <d7798db1-fb51-4229-aa32-829f2b4a48b7@googlegroups.com> |
| In reply to | #34480 |
Den lördag 6 januari 2018 kl. 15:08:28 UTC+1 skrev Jonas Thörnvall:
> Den lördag 6 januari 2018 kl. 14:34:50 UTC+1 skrev Jonas Thörnvall:
> > Den lördag 6 januari 2018 kl. 14:28:50 UTC+1 skrev Jonas Thörnvall:
> > > Den lördag 6 januari 2018 kl. 14:26:27 UTC+1 skrev Jonas Thörnvall:
> > > > Den lördag 6 januari 2018 kl. 13:24:58 UTC+1 skrev Julio Di Egidio:
> > > > > On Saturday, January 6, 2018 at 12:39:55 PM UTC+1, Jonas Thörnvall wrote:
> > > > > > Den lördag 6 januari 2018 kl. 12:25:13 UTC+1 skrev Julio Di Egidio:
> > > > > > > On Saturday, January 6, 2018 at 11:23:16 AM UTC+1, Jonas Thörnvall wrote:
> > > > > > > <snip>
> > > > > > > > var inputs = midi.inputs.values();
> > > > > > > >
> > > > > > > > Is midi.input.values(); a function or a method?
> > > > > > >
> > > > > > > There are no methods in JS, only functions, in fact closures.
> > > > > > > Then there are objects with properties, not attributes.
> > > > > > >
> > > > > > > Those properties, just like variables, can hold any value, including
> > > > > > > references to functions (again, to closures), e.g.:
> > > > > > >
> > > > > > > myobj.func = function () { return dosomething(); };
> > > > > > >
> > > > > > > > How do i know the difference?
> > > > > > >
> > > > > > > RTFM? JS is notoriously the world's most misunderstood programming language
> > > > > > > ever, OTOH a language spec as well as some good enough tutorials are not
> > > > > > > that difficult to find really:
> > > > > > >
> > > > > > > <https://developer.mozilla.org/bm/docs/Web/JavaScript>
> > > > > > >
> > > > > > > > my.balls=jump
> > > > > > > >
> > > > > > > > I can't track down the meaning within the code?
> > > > > > >
> > > > > > > You cannot track the meaning of anything in that sense, i.e. by just
> > > > > > > considering the rules of the language: readability (which includes
> > > > > > > readable meaningfulness), just as correctness, is something we *strive*
> > > > > > > for...
> > > > > >
> > > > > > But should one not be able to differentiate a function from a variable or
> > > > > > from a listener. A value allocation from a function call?
> > > > >
> > > > > Not just by the name unless the programmer is using proper conventions, and
> > > > > even then one should be careful when reviewing code, as generally very few
> > > > > programmers can write decent code, but even the good programmers make
> > > > > mistakes and are subject to fatigue.
> > > > >
> > > > > > Is this a value allocation or a function call.
> > > > > >
> > > > > > my.balls=jump;
> > > > >
> > > > > That is an *assignment*, dumbass. RTFM.
> > > > >
> > > > > *Plonk*
> > > > >
> > > > > Julio
> > > >
> > > > Really?????? Are you sure then why the fuck are there functions that never been called using those names?
> > > >
> > > > input.onmidimessage = echoMIDIMessage;
> > > > input.value.onmidimessage = onMIDIMessage;
> > > >
> > > >
> > > > If so why are there functions with those names?
> > > >
> > > > function onMIDIMessage (message) {
> > > > midiToOutPort(message);
> > > > }
> > > >
> > > > function echoMIDIMessage( event ) {
> > > > if (output) {
> > > > output.send( event.data, event.timestamp );
> > > > }
> > > > }
> > > >
> > > >
> > > > eatmy.balls=dumbass
> > >
> > > Since you say they are assignments and not function calls, what are they doing?
> > > input.onmidimessage = echoMIDIMessage;
> > > input.value.onmidimessage = onMIDIMessage;
> > > eatmy.balls=dumbass;
> >
> > Are you telling me echoMIDIMessage and onMIDIMessage are variables? If so where the fuck did they come from? And why would you assign a null variable to an input port? Or are they functions assigned to a port.
> >
> > You said they are assignments YES or NO?
>
> Here is something relatable? OR?
> But how the fuck am one supposed to guess that input is an object and onmidimessage an event attached to the object, and that onMIDIMessage is a function that will be called at the event onmidimessage by looking at it?
> It is insane semantics, isn't it?
>
> But it fucking get worse....
> input.value.onmidimessage = onMIDIMessage;
>
> Uuuuuuh what the fuck is value here?
> I can't even guess that even though i have an example below, of an event upon an object trigger a function?
>
> And why the fuck is the order object.event=function the linguistics of the shit you put together is so convoluted stupid in semantics one want to throw up on the shit, the only thing you managed to get right is string and array handling in javascript.
>
> Of course it must be
> ON punch OBJECT dumbass CALL out
>
> Now you see i managed to get semantics that include it is
> 1. EVENT using ON and its name
> 2. OBJECT and its name
> 3. CALL a function or if you send parameters you can leave out CALL and use brackets.
>
> Now we compare which is more readable
>
> dumbass.punch=out
>
> or
>
> ON punch OBJECT dumbass CALL out
>
>
> But the real dumbass prefer the punch to be an assigment.
>
>
>
>
>
>
>
>
> As the other said you should assign a function.
>
> Just wanted to point out that in this case you want to pass a value so you need to assign an anonymous function (or a named function defined inline) like
>
> button.onclick = function() {otherfunction(parameter)};
> If the function you want to assign does NOT require a parameter you can use it directly
>
> button.onclick = otherfunction;
> Note that there is no parenthesis in this case
>
> button.onclick = otherfunction(); // this doesn't work
> won't work as it will call otherfunction as soon as it is parsed
I mean it can't be you are such fucking intelligent that writing out the words is the more time consuming part of programming. Isn't it fucking better to go for readability of the code, then go all in ***HIDING THE PROPERTIES OF THE PROGRAMMING LANGUAGE*** using nonsense syntax that save letters?
Are you fucking going back to Perl, is that the mission making a new EMACS?
Or is it fucking about selling books? What is the fucking mission behind nonsense syntax, is it getting to easy to program for none anal personas with ideas? Are you going back to the fucking cult of memorise blip, blop semantics now when you no longer can justify programming in assembler and machinelanguages. You trying to develop a high order programming language that look like blip blop programming, so people can't fucking read what you write?
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-06 06:36 -0800 |
| Message-ID | <95f99859-20a2-4c15-833c-3cf5b314fbb6@googlegroups.com> |
| In reply to | #34483 |
Den lördag 6 januari 2018 kl. 15:27:19 UTC+1 skrev Jonas Thörnvall:
> Den lördag 6 januari 2018 kl. 15:08:28 UTC+1 skrev Jonas Thörnvall:
> > Den lördag 6 januari 2018 kl. 14:34:50 UTC+1 skrev Jonas Thörnvall:
> > > Den lördag 6 januari 2018 kl. 14:28:50 UTC+1 skrev Jonas Thörnvall:
> > > > Den lördag 6 januari 2018 kl. 14:26:27 UTC+1 skrev Jonas Thörnvall:
> > > > > Den lördag 6 januari 2018 kl. 13:24:58 UTC+1 skrev Julio Di Egidio:
> > > > > > On Saturday, January 6, 2018 at 12:39:55 PM UTC+1, Jonas Thörnvall wrote:
> > > > > > > Den lördag 6 januari 2018 kl. 12:25:13 UTC+1 skrev Julio Di Egidio:
> > > > > > > > On Saturday, January 6, 2018 at 11:23:16 AM UTC+1, Jonas Thörnvall wrote:
> > > > > > > > <snip>
> > > > > > > > > var inputs = midi.inputs.values();
> > > > > > > > >
> > > > > > > > > Is midi.input.values(); a function or a method?
> > > > > > > >
> > > > > > > > There are no methods in JS, only functions, in fact closures.
> > > > > > > > Then there are objects with properties, not attributes.
> > > > > > > >
> > > > > > > > Those properties, just like variables, can hold any value, including
> > > > > > > > references to functions (again, to closures), e.g.:
> > > > > > > >
> > > > > > > > myobj.func = function () { return dosomething(); };
> > > > > > > >
> > > > > > > > > How do i know the difference?
> > > > > > > >
> > > > > > > > RTFM? JS is notoriously the world's most misunderstood programming language
> > > > > > > > ever, OTOH a language spec as well as some good enough tutorials are not
> > > > > > > > that difficult to find really:
> > > > > > > >
> > > > > > > > <https://developer.mozilla.org/bm/docs/Web/JavaScript>
> > > > > > > >
> > > > > > > > > my.balls=jump
> > > > > > > > >
> > > > > > > > > I can't track down the meaning within the code?
> > > > > > > >
> > > > > > > > You cannot track the meaning of anything in that sense, i.e. by just
> > > > > > > > considering the rules of the language: readability (which includes
> > > > > > > > readable meaningfulness), just as correctness, is something we *strive*
> > > > > > > > for...
> > > > > > >
> > > > > > > But should one not be able to differentiate a function from a variable or
> > > > > > > from a listener. A value allocation from a function call?
> > > > > >
> > > > > > Not just by the name unless the programmer is using proper conventions, and
> > > > > > even then one should be careful when reviewing code, as generally very few
> > > > > > programmers can write decent code, but even the good programmers make
> > > > > > mistakes and are subject to fatigue.
> > > > > >
> > > > > > > Is this a value allocation or a function call.
> > > > > > >
> > > > > > > my.balls=jump;
> > > > > >
> > > > > > That is an *assignment*, dumbass. RTFM.
> > > > > >
> > > > > > *Plonk*
> > > > > >
> > > > > > Julio
> > > > >
> > > > > Really?????? Are you sure then why the fuck are there functions that never been called using those names?
> > > > >
> > > > > input.onmidimessage = echoMIDIMessage;
> > > > > input.value.onmidimessage = onMIDIMessage;
> > > > >
> > > > >
> > > > > If so why are there functions with those names?
> > > > >
> > > > > function onMIDIMessage (message) {
> > > > > midiToOutPort(message);
> > > > > }
> > > > >
> > > > > function echoMIDIMessage( event ) {
> > > > > if (output) {
> > > > > output.send( event.data, event.timestamp );
> > > > > }
> > > > > }
> > > > >
> > > > >
> > > > > eatmy.balls=dumbass
> > > >
> > > > Since you say they are assignments and not function calls, what are they doing?
> > > > input.onmidimessage = echoMIDIMessage;
> > > > input.value.onmidimessage = onMIDIMessage;
> > > > eatmy.balls=dumbass;
> > >
> > > Are you telling me echoMIDIMessage and onMIDIMessage are variables? If so where the fuck did they come from? And why would you assign a null variable to an input port? Or are they functions assigned to a port.
> > >
> > > You said they are assignments YES or NO?
> >
> > Here is something relatable? OR?
> > But how the fuck am one supposed to guess that input is an object and onmidimessage an event attached to the object, and that onMIDIMessage is a function that will be called at the event onmidimessage by looking at it?
> > It is insane semantics, isn't it?
> >
> > But it fucking get worse....
> > input.value.onmidimessage = onMIDIMessage;
> >
> > Uuuuuuh what the fuck is value here?
> > I can't even guess that even though i have an example below, of an event upon an object trigger a function?
> >
> > And why the fuck is the order object.event=function the linguistics of the shit you put together is so convoluted stupid in semantics one want to throw up on the shit, the only thing you managed to get right is string and array handling in javascript.
> >
> > Of course it must be
> > ON punch OBJECT dumbass CALL out
> >
> > Now you see i managed to get semantics that include it is
> > 1. EVENT using ON and its name
> > 2. OBJECT and its name
> > 3. CALL a function or if you send parameters you can leave out CALL and use brackets.
> >
> > Now we compare which is more readable
> >
> > dumbass.punch=out
> >
> > or
> >
> > ON punch OBJECT dumbass CALL out
> >
> >
> > But the real dumbass prefer the punch to be an assigment.
> >
> >
> >
> >
> >
> >
> >
> >
> > As the other said you should assign a function.
> >
> > Just wanted to point out that in this case you want to pass a value so you need to assign an anonymous function (or a named function defined inline) like
> >
> > button.onclick = function() {otherfunction(parameter)};
> > If the function you want to assign does NOT require a parameter you can use it directly
> >
> > button.onclick = otherfunction;
> > Note that there is no parenthesis in this case
> >
> > button.onclick = otherfunction(); // this doesn't work
> > won't work as it will call otherfunction as soon as it is parsed
>
> I mean it can't be you are such fucking intelligent that writing out the words is the more time consuming part of programming. Isn't it fucking better to go for readability of the code, then go all in ***HIDING THE PROPERTIES OF THE PROGRAMMING LANGUAGE*** using nonsense syntax that save letters?
>
> Are you fucking going back to Perl, is that the mission making a new EMACS?
> Or is it fucking about selling books? What is the fucking mission behind nonsense syntax, is it getting to easy to program for none anal personas with ideas? Are you going back to the fucking cult of memorise blip, blop semantics now when you no longer can justify programming in assembler and machinelanguages. You trying to develop a high order programming language that look like blip blop programming, so people can't fucking read what you write?
If it is about saving fucking place and a few Kbytes here and there have a fucking parser deal with it buy you fucking can't hide what is an object a event a variable and expect people will guess the shit its insane.
Fucking build a blip blop parser for those inclined to anal workflow using blip blops, and give the intelligent people a working tool where you do not have to read the full script to figure out what is taking place.
go.eat=shit
Yeah that make sense
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-06 07:34 -0800 |
| Message-ID | <31ccc545-95c8-496e-8680-b26cdb748805@googlegroups.com> |
| In reply to | #34484 |
Den lördag 6 januari 2018 kl. 15:36:23 UTC+1 skrev Jonas Thörnvall:
> Den lördag 6 januari 2018 kl. 15:27:19 UTC+1 skrev Jonas Thörnvall:
> > Den lördag 6 januari 2018 kl. 15:08:28 UTC+1 skrev Jonas Thörnvall:
> > > Den lördag 6 januari 2018 kl. 14:34:50 UTC+1 skrev Jonas Thörnvall:
> > > > Den lördag 6 januari 2018 kl. 14:28:50 UTC+1 skrev Jonas Thörnvall:
> > > > > Den lördag 6 januari 2018 kl. 14:26:27 UTC+1 skrev Jonas Thörnvall:
> > > > > > Den lördag 6 januari 2018 kl. 13:24:58 UTC+1 skrev Julio Di Egidio:
> > > > > > > On Saturday, January 6, 2018 at 12:39:55 PM UTC+1, Jonas Thörnvall wrote:
> > > > > > > > Den lördag 6 januari 2018 kl. 12:25:13 UTC+1 skrev Julio Di Egidio:
> > > > > > > > > On Saturday, January 6, 2018 at 11:23:16 AM UTC+1, Jonas Thörnvall wrote:
> > > > > > > > > <snip>
> > > > > > > > > > var inputs = midi.inputs.values();
> > > > > > > > > >
> > > > > > > > > > Is midi.input.values(); a function or a method?
> > > > > > > > >
> > > > > > > > > There are no methods in JS, only functions, in fact closures.
> > > > > > > > > Then there are objects with properties, not attributes.
> > > > > > > > >
> > > > > > > > > Those properties, just like variables, can hold any value, including
> > > > > > > > > references to functions (again, to closures), e.g.:
> > > > > > > > >
> > > > > > > > > myobj.func = function () { return dosomething(); };
> > > > > > > > >
> > > > > > > > > > How do i know the difference?
> > > > > > > > >
> > > > > > > > > RTFM? JS is notoriously the world's most misunderstood programming language
> > > > > > > > > ever, OTOH a language spec as well as some good enough tutorials are not
> > > > > > > > > that difficult to find really:
> > > > > > > > >
> > > > > > > > > <https://developer.mozilla.org/bm/docs/Web/JavaScript>
> > > > > > > > >
> > > > > > > > > > my.balls=jump
> > > > > > > > > >
> > > > > > > > > > I can't track down the meaning within the code?
> > > > > > > > >
> > > > > > > > > You cannot track the meaning of anything in that sense, i.e. by just
> > > > > > > > > considering the rules of the language: readability (which includes
> > > > > > > > > readable meaningfulness), just as correctness, is something we *strive*
> > > > > > > > > for...
> > > > > > > >
> > > > > > > > But should one not be able to differentiate a function from a variable or
> > > > > > > > from a listener. A value allocation from a function call?
> > > > > > >
> > > > > > > Not just by the name unless the programmer is using proper conventions, and
> > > > > > > even then one should be careful when reviewing code, as generally very few
> > > > > > > programmers can write decent code, but even the good programmers make
> > > > > > > mistakes and are subject to fatigue.
> > > > > > >
> > > > > > > > Is this a value allocation or a function call.
> > > > > > > >
> > > > > > > > my.balls=jump;
> > > > > > >
> > > > > > > That is an *assignment*, dumbass. RTFM.
> > > > > > >
> > > > > > > *Plonk*
> > > > > > >
> > > > > > > Julio
> > > > > >
> > > > > > Really?????? Are you sure then why the fuck are there functions that never been called using those names?
> > > > > >
> > > > > > input.onmidimessage = echoMIDIMessage;
> > > > > > input.value.onmidimessage = onMIDIMessage;
> > > > > >
> > > > > >
> > > > > > If so why are there functions with those names?
> > > > > >
> > > > > > function onMIDIMessage (message) {
> > > > > > midiToOutPort(message);
> > > > > > }
> > > > > >
> > > > > > function echoMIDIMessage( event ) {
> > > > > > if (output) {
> > > > > > output.send( event.data, event.timestamp );
> > > > > > }
> > > > > > }
> > > > > >
> > > > > >
> > > > > > eatmy.balls=dumbass
> > > > >
> > > > > Since you say they are assignments and not function calls, what are they doing?
> > > > > input.onmidimessage = echoMIDIMessage;
> > > > > input.value.onmidimessage = onMIDIMessage;
> > > > > eatmy.balls=dumbass;
> > > >
> > > > Are you telling me echoMIDIMessage and onMIDIMessage are variables? If so where the fuck did they come from? And why would you assign a null variable to an input port? Or are they functions assigned to a port.
> > > >
> > > > You said they are assignments YES or NO?
> > >
> > > Here is something relatable? OR?
> > > But how the fuck am one supposed to guess that input is an object and onmidimessage an event attached to the object, and that onMIDIMessage is a function that will be called at the event onmidimessage by looking at it?
> > > It is insane semantics, isn't it?
> > >
> > > But it fucking get worse....
> > > input.value.onmidimessage = onMIDIMessage;
> > >
> > > Uuuuuuh what the fuck is value here?
> > > I can't even guess that even though i have an example below, of an event upon an object trigger a function?
> > >
> > > And why the fuck is the order object.event=function the linguistics of the shit you put together is so convoluted stupid in semantics one want to throw up on the shit, the only thing you managed to get right is string and array handling in javascript.
> > >
> > > Of course it must be
> > > ON punch OBJECT dumbass CALL out
> > >
> > > Now you see i managed to get semantics that include it is
> > > 1. EVENT using ON and its name
> > > 2. OBJECT and its name
> > > 3. CALL a function or if you send parameters you can leave out CALL and use brackets.
> > >
> > > Now we compare which is more readable
> > >
> > > dumbass.punch=out
> > >
> > > or
> > >
> > > ON punch OBJECT dumbass CALL out
> > >
> > >
> > > But the real dumbass prefer the punch to be an assigment.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > As the other said you should assign a function.
> > >
> > > Just wanted to point out that in this case you want to pass a value so you need to assign an anonymous function (or a named function defined inline) like
> > >
> > > button.onclick = function() {otherfunction(parameter)};
> > > If the function you want to assign does NOT require a parameter you can use it directly
> > >
> > > button.onclick = otherfunction;
> > > Note that there is no parenthesis in this case
> > >
> > > button.onclick = otherfunction(); // this doesn't work
> > > won't work as it will call otherfunction as soon as it is parsed
> >
> > I mean it can't be you are such fucking intelligent that writing out the words is the more time consuming part of programming. Isn't it fucking better to go for readability of the code, then go all in ***HIDING THE PROPERTIES OF THE PROGRAMMING LANGUAGE*** using nonsense syntax that save letters?
> >
> > Are you fucking going back to Perl, is that the mission making a new EMACS?
> > Or is it fucking about selling books? What is the fucking mission behind nonsense syntax, is it getting to easy to program for none anal personas with ideas? Are you going back to the fucking cult of memorise blip, blop semantics now when you no longer can justify programming in assembler and machinelanguages. You trying to develop a high order programming language that look like blip blop programming, so people can't fucking read what you write?
>
> If it is about saving fucking place and a few Kbytes here and there have a fucking parser deal with it buy you fucking can't hide what is an object a event a variable and expect people will guess the shit its insane.
>
> Fucking build a blip blop parser for those inclined to anal workflow using blip blops, and give the intelligent people a working tool where you do not have to read the full script to figure out what is taking place.
>
> go.eat=shit
>
> Yeah that make sense
Well i go back to program now but i can only conclude that the people behind ECMA script created a syntax and semantics of the coding language that is ambiguous that mean it is not possible to generalise into a parser without knowing ***every*** built in object and event names. The idiots built a syntax around names of objects bwhahahaha rather then conceptualisation around different programming structures.
When you see the command ***buttfucked*** in script then look up closest EMAC manual to find out if it was an event, a function call, a method or it could have been a variable assignment. Don't forget you will need the EMAC manual again if you want to buttfuck some other programmers trying to read your code.
To these people things like A.B=C have meaning they instinctly know that A is an object and B is the event and C is the function that will be called. Because when you eat ass all night, you stop to questioning things you just memorise what they feed you, that way there is no problem to accept idiocies.
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2018-01-06 09:56 -0800 |
| Message-ID | <3f660d43-aa70-49f7-acdc-af564fb71a4e@googlegroups.com> |
| In reply to | #34484 |
On Saturday, January 6, 2018 at 8:36:23 AM UTC-6, Jonas Thörnvall wrote: > Den lördag 6 januari 2018 kl. 15:27:19 UTC+1 skrev Jonas Thörnvall: > > Den lördag 6 januari 2018 kl. 15:08:28 UTC+1 skrev Jonas Thörnvall: > > > Den lördag 6 januari 2018 kl. 14:34:50 UTC+1 skrev Jonas Thörnvall: > > > > Den lördag 6 januari 2018 kl. 14:28:50 UTC+1 skrev Jonas Thörnvall: > > > > > Den lördag 6 januari 2018 kl. 14:26:27 UTC+1 skrev Jonas Thörnvall: > > > > > > Den lördag 6 januari 2018 kl. 13:24:58 UTC+1 skrev Julio Di Egidio: > > > > > > > On Saturday, January 6, 2018 at 12:39:55 PM UTC+1, Jonas Thörnvall wrote: > > > > > > > > Den lördag 6 januari 2018 kl. 12:25:13 UTC+1 skrev Julio Di Egidio: > > > > > > > > > On Saturday, January 6, 2018 at 11:23:16 AM UTC+1, Jonas Thörnvall wrote: [...] Holy bloated headers batman
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2018-01-06 14:21 +0000 |
| Message-ID | <bom15dps2189qe8qcrq7ug4oe4kjnf8kjf@4ax.com> |
| In reply to | #34472 |
On Sat, 6 Jan 2018 03:25:03 -0800 (PST), Julio Di Egidio <julio@diegidio.name> wrote: <snip> >Those properties, just like variables, can hold any value, including >references to functions <snip> No. The value of a Java variable can be a reference. The value of an ECMAScript variable cannot. Nor can the value of an ECMAScript property. As we used to tell newbies in the days of Netscape Navigator Java != JavaScript John
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2018-01-06 17:42 +0000 |
| Message-ID | <87a7xq6g01.fsf@bsb.me.uk> |
| In reply to | #34472 |
Julio Di Egidio <julio@diegidio.name> writes: > On Saturday, January 6, 2018 at 11:23:16 AM UTC+1, Jonas Thörnvall wrote: > <snip> >> var inputs = midi.inputs.values(); >> >> Is midi.input.values(); a function or a method? > > There are no methods in JS, only functions, in fact closures. From section 4.2 of the ECMA 262 language specification: "A function that is associated with an object via a property is called a method." (in all the editions I've so far checked from 5.1 to 8). > ... OTOH a language spec as well as some good enough tutorials are not > that difficult to find really: > > <https://developer.mozilla.org/bm/docs/Web/JavaScript> This site, too, talks about methods. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2018-01-06 11:47 -0800 |
| Message-ID | <e230aa18-34df-46ab-8266-4db1f81667b5@googlegroups.com> |
| In reply to | #34487 |
On Saturday, January 6, 2018 at 6:42:32 PM UTC+1, Ben Bacarisse wrote: > Julio Di Egidio <julio@diegidio.name> writes: > > On Saturday, January 6, 2018 at 11:23:16 AM UTC+1, Jonas Thörnvall wrote: > > <snip> > >> var inputs = midi.inputs.values(); > >> > >> Is midi.input.values(); a function or a method? > > > > There are no methods in JS, only functions, in fact closures. > > From section 4.2 of the ECMA 262 language specification: > > "A function that is associated with an object via a property is called > a method." > > (in all the editions I've so far checked from 5.1 to 8). The magic of words and the total cluelessness... It calls it a "method" just because its a *SLOPPY* fucking standard, mainly thought for the clueless "web programmer", which was a very stupid move indeed already at the time, but now the computer scientists are getting programming jobs without knowing the first thing about programming, and are completely fucking lost, on words. Read this, I have not written it: <https://stackoverflow.com/a/18402468> > > ... OTOH a language spec as well as some good enough tutorials are not > > that difficult to find really: > > > > <https://developer.mozilla.org/bm/docs/Web/JavaScript> > > This site, too, talks about methods. It also calls JS an OO language on the very front page, which is why I said "good enough". Now keep lying. *Plonk* Julio
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2018-01-06 22:11 +0100 |
| Message-ID | <p2re1g$d0l$1@solani.org> |
| In reply to | #34491 |
On 06.01.2018 at 20:47, Julio Di Egidio wrote: > On Saturday, January 6, 2018 at 6:42:32 PM UTC+1, Ben Bacarisse wrote: > >> Julio Di Egidio <julio@diegidio.name> writes: >> >>> There are no methods in JS, only functions, in fact closures. >> >> From section 4.2 of the ECMA 262 language specification: >> >> "A function that is associated with an object via a property is called >> a method." >> >> (in all the editions I've so far checked from 5.1 to 8). > > The magic of words and the total cluelessness... > > Read this, I have not written it: <https://stackoverflow.com/a/18402468> Interestingly, this SO answer points to its authors blog[1], where he writes: | Note: As of ES2015, JavaScript arguably got methods (and that is the | term the spec uses) via a new notation on object initializers and via | the class syntax. This article predates ES2015 and refers to | non-method properties on prototypes, created with the function keyword | (the new method syntax doesn't use the function keyword). [1] <http://blog.niftysnippets.org/2008/03/mythical-methods.html> -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2018-01-06 13:28 -0800 |
| Message-ID | <15e4e78b-a7fa-42b9-bee4-f8a869c11b24@googlegroups.com> |
| In reply to | #34492 |
On Saturday, January 6, 2018 at 10:11:22 PM UTC+1, Christoph M. Becker wrote: > On 06.01.2018 at 20:47, Julio Di Egidio wrote: > > On Saturday, January 6, 2018 at 6:42:32 PM UTC+1, Ben Bacarisse wrote: > > > >> Julio Di Egidio <julio@diegidio.name> writes: > >> > >>> There are no methods in JS, only functions, in fact closures. > >> > >> From section 4.2 of the ECMA 262 language specification: > >> > >> "A function that is associated with an object via a property is called > >> a method." > >> > >> (in all the editions I've so far checked from 5.1 to 8). > > > > The magic of words and the total cluelessness... [It calls it a "method" just because its a *SLOPPY* fucking standard...] > > Read this, I have not written it: <https://stackoverflow.com/a/18402468> > > Interestingly, this SO answer points to its authors blog[1], where he > writes: > > | 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... Julio
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2018-01-07 12:40 +0100 |
| Message-ID | <p2t0v8$ceh$1@solani.org> |
| In reply to | #34493 |
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] <http://ramdajs.com/docs/#map>
--
Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2018-01-07 13:01 +0100 |
| Message-ID | <XnsA86384812E33Feejj99@194.109.6.166> |
| In reply to | #34495 |
"Christoph M. Becker" <cmbecker69@arcor.de> wrote on 07 Jan 2018 in
comp.lang.javascript:
> 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.
Isn't any function [also] a method of an object?
... where 'this' just points to a default input-parameter?
window.a = 3;
function f() {return this.a};
console.log(window.f()); // 3
compared to:
window.a = 3;
function f(ob) {return ob.a};
console.log(f(window)); // 3
======
Originally, a function was a [sub]routine that returned a value,
so that it could be used inside a mathematical formula.
The functionality of the function seems to have been expanded beond measure.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2018-01-07 19:43 +0100 |
| Message-ID | <p2tpnt$v0i$1@solani.org> |
| In reply to | #34496 |
On 07.01.2018 at 13:01, Evertjan. wrote: > Isn't any function [also] a method of an object? If you mean that every function is assigned to a property of some (user visible) object, that is not the case. Consider anonymous functions, for instance. -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2018-01-07 20:33 +0100 |
| Message-ID | <XnsA863D13584A9Feejj99@194.109.6.166> |
| In reply to | #34503 |
"Christoph M. Becker" <cmbecker69@arcor.de> wrote on 07 Jan 2018 in comp.lang.javascript: > On 07.01.2018 at 13:01, Evertjan. wrote: > >> Isn't any function [also] a method of an object? > > If you mean that every function is assigned to a property of some (user > visible) object, that is not the case. Not 'is' but 'can be', and not 'to' a 'property' but 'to' an object 'as' a 'method'. Well, you could view a method to be an active property. I hope ;-( > Consider anonymous functions, for instance. Right, I didn't. I now will consider them to be a clever trick. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2018-01-07 08:30 -0800 |
| Message-ID | <3aea137e-5e1b-4ca2-9233-1a11bc09280a@googlegroups.com> |
| In reply to | #34495 |
On Sunday, January 7, 2018 at 12:40:36 PM UTC+1, Christoph M. Becker wrote: > 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, As a matter of fact, that's exactly upside down: JS is *born* functional. > and I understand why some prefer and advocate > functional programming over object oriented programming. That is not my point, use the right tool for the right job: OO is just fine, where it is appropriate. > 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. <snip> Of course one can, it remains nonsense on the whole line. > BTW: I would suggest to avoid explicit language, at least in public > discussions. :) Please stick political correctness where it doesn't shine. What is truly horrifying is not so much the fucking criminal retarded cunts who run this planet, but rather the intelligent people like you who will just never do the right thing ever... Julio
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2018-01-07 14:05 +0000 |
| Message-ID | <18a45dp6jjdm8q7cb8sdb88tni4mellams@4ax.com> |
| In reply to | #34491 |
On Sat, 6 Jan 2018 11:47:41 -0800 (PST), Julio Di Egidio <julio@diegidio.name> wrote: >On Saturday, January 6, 2018 at 6:42:32 PM UTC+1, Ben Bacarisse wrote: <snip> >> "A function that is associated with an object via a property is called >> a method." >> >> (in all the editions I've so far checked from 5.1 to 8). > >The magic of words and the total cluelessness... > >It calls it a "method" just because its a *SLOPPY* fucking standard, mainly >thought for the clueless "web programmer", which was a very stupid move >indeed already at the time, but now the computer scientists are getting >programming jobs without knowing the first thing about programming, and >are completely fucking lost, on words. <snip> Stop being a twerp. An International Standard can define "method" to mean anything it wants it to mean, *within* the standard. If you ever read a non-trivial maths textbook you'll notice that professional mathematicians often define words with only local scope. The idea of names having local scope is useful and is sometimes used in Computer Science. John
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2018-01-07 08:33 -0800 |
| Message-ID | <c2f9a6b2-4431-418f-a578-46e90e304569@googlegroups.com> |
| In reply to | #34497 |
On Sunday, January 7, 2018 at 3:05:32 PM UTC+1, John G Harris wrote: > On Sat, 6 Jan 2018 11:47:41 -0800 (PST), Julio Di Egidio > <julio@diegidio.name> wrote: > >On Saturday, January 6, 2018 at 6:42:32 PM UTC+1, Ben Bacarisse wrote: > <snip> > >> "A function that is associated with an object via a property is called > >> a method." > >> > >> (in all the editions I've so far checked from 5.1 to 8). > > > >The magic of words and the total cluelessness... > > > >It calls it a "method" just because its a *SLOPPY* fucking standard, mainly > >thought for the clueless "web programmer", which was a very stupid move > >indeed already at the time, but now the computer scientists are getting > >programming jobs without knowing the first thing about programming, and > >are completely fucking lost, on words. > <snip> > > Stop being a twerp. Stop being a liar. > An International Standard can define "method" to > mean anything it wants it to mean, *within* the standard. Yes and no: they could have said, even just in a side note, "we'll call these methods henceforth, but please don't trip over it". That's not what they have been doing, in fact the opposite of it. Julio
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2018-01-08 09:46 +0000 |
| Message-ID | <hbf65d16raph6so56t265vnfbcineti5bc@4ax.com> |
| In reply to | #34502 |
On Sun, 7 Jan 2018 08:33:31 -0800 (PST), Julio Di Egidio <julio@diegidio.name> wrote: >On Sunday, January 7, 2018 at 3:05:32 PM UTC+1, John G Harris wrote: <snip> >> An International Standard can define "method" to >> mean anything it wants it to mean, *within* the standard. > >Yes and no: they could have said, even just in a side note, "we'll call >these methods henceforth, but please don't trip over it". That's not what >they have been doing, in fact the opposite of it. You will of course now add a note to the Wikipedia entry on Method (computer programming) giving your definition of 'method'. John
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2018-01-08 03:45 -0800 |
| Message-ID | <196c0ed3-04cd-4d43-b7f7-959fbfc3caac@googlegroups.com> |
| In reply to | #34514 |
On Monday, January 8, 2018 at 10:46:43 AM UTC+1, John G Harris wrote: > On Sun, 7 Jan 2018 08:33:31 -0800 (PST), Julio Di Egidio > <julio@diegidio.name> wrote: > >On Sunday, January 7, 2018 at 3:05:32 PM UTC+1, John G Harris wrote: > <snip> > >> An International Standard can define "method" to > >> mean anything it wants it to mean, *within* the standard. > > > >Yes and no: they could have said, even just in a side note, "we'll call > >these methods henceforth, but please don't trip over it". That's not what > >they have been doing, in fact the opposite of it. > > You will of course now add a note to the Wikipedia entry on Method > (computer programming) giving your definition of 'method'. LOL. That article is fine. You should just learn to read first. *Plonk* Julio
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-06 03:39 -0800 |
| Message-ID | <b00be52e-fee1-438c-b79b-dc13b19ab86b@googlegroups.com> |
| In reply to | #34471 |
To get a little deeper in my understanding deficiency when it come to object oriented programming. Here is a function with a loop "well now two loops" i basicly just copied the in code two get the outports because original there was monophonic synth, and no output ports.
So script get out and in ports "i have zero idea how they stored" but they come from in inputs/outputs in a loop.
So it is just a loop through get the names of each? "Well that was what i was thinking". Until i saw this "from the original example code"
// each time there is a midi message call the onMIDIMessage function
input.value.onmidimessage = onMIDIMessage;
Here i got confused how can there be a midi message "listener?" within a loop.
But one just have to accept there is no way to understand this? But why in loop i am clueless, so i just string somecode together to list the ports list them in a select option list. And somehow "input.value.onmidimessage=onMidiMessage;
in ***A SAIN WORLD*** would be onMIDIMessage(input.valueonmidimessage);
Because otherwise i fucking can not understand where function onMIDIMessage (message) {} come from?
But in a sain world that function/method call would not be in a loop "that is not my code", i just do not get it? "If you don't understand don't change it"
And it is kind of strange it just loop thru the port ones, never more and then it just *listen*? for messages within loop?
Well whatever...
Well i figured out that send midi messages yourself was fairly easy like "program and channel change".
output.send( );
There is more insane thing in the code like this function it is never called "what i can see" but that is the active code that echo the midimessages. Where is the function call????
I can see the call to the success function but to onMIDISuccess there is never any call but yet the function executed how?
Can someone please explain how things string together...
function onMIDISuccess( midiAccess ) {
console.log( "MIDI ready!" );
var input = midiAccess.inputs.entries.next();
if (input)
input.onmidimessage = echoMIDIMessage;
output = midiAccess.outputs.values().next().value;
if (!input || !output)
console.log("Uh oh! Couldn't get i/o ports.");
}
function success (midi) {
mid=midi;
inputs = midi.inputs.values();
outputs = midi.outputs.values();
// inputs outputs are Iterators
for (output = outputs.next(); output && !output.done; output = outputs.next()) {
var deviceOut = output.value.name;
console.log(deviceOut);
var optout = document.createElement("option");
optout.text = deviceOut;
document.getElementById("out_portsel").add(optout);
}
for (input = inputs.next(); input && !input.done; input = inputs.next()) {
var deviceIn = input.value.name;
var optin = document.createElement("option");
optin.text = deviceIn;
document.getElementById("in_portsel").add(optin);
// each time there is a midi message call the onMIDIMessage function
input.value.onmidimessage = onMIDIMessage;
}
document.getElementById("out_portsel").selectedIndex=outportindex;
changeProgram();
}
[toc] | [prev] | [next] | [standalone]
Page 2 of 4 — ← Prev page 1 [2] 3 4 Next page →
Back to top | Article view | comp.lang.javascript
csiph-web