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


Groups > comp.lang.javascript > #35675

Re: Ideas behind programming language syntax choices?

Newsgroups comp.lang.javascript
Date 2018-09-25 11:22 -0700
References (4 earlier) <52dd561f-b4fa-49b4-bfbe-b8240cd87eba@googlegroups.com> <8a44ea36-c466-4bc4-9b1b-9ebb39caaa1a@googlegroups.com> <5ba95c6f$0$16957$e4fe514c@newszilla.xs4all.nl> <92966c96-d786-4a97-832e-03bd26738628@googlegroups.com> <5baa7356$0$13568$e4fe514c@newszilla.xs4all.nl>
Message-ID <bb89bb4e-7d9b-4f79-8451-60ee1dceaf35@googlegroups.com> (permalink)
Subject Re: Ideas behind programming language syntax choices?
From Jonas Thörnvall <jonas.thornvall@gmail.com>

Show all headers | View raw


Den tisdag 25 september 2018 kl. 19:41:49 UTC+2 skrev Silvio:
> On 25-09-18 11:51, Jonas Thörnvall wrote:
> > Den måndag 24 september 2018 kl. 23:51:50 UTC+2 skrev Silvio:
> >> On 24-09-18 03:06, Jonas Thörnvall wrote:
> >>> Den måndag 24 september 2018 kl. 02:02:10 UTC+2 skrev Jonas Thörnvall:
> >>>> Den måndag 24 september 2018 kl. 01:56:53 UTC+2 skrev Jonas Thörnvall:
> >>>>> Den måndag 24 september 2018 kl. 01:52:17 UTC+2 skrev Jonas Thörnvall:
> >>>>>> Den måndag 24 september 2018 kl. 00:33:55 UTC+2 skrev Silvio:
> >>>>>>> On 22-09-18 06:53, Jonas Thörnvall wrote:
> >>>>>>>> Often i find it a bit backward reading code, so i wonder a bit about the reason behind choices done in programming languages.
> >>>>>>>>
> >>>>>>>> Why
> >>>>>>>> track[recTrack].midiMess.splice(trackevent,1);
> >>>>>>>> and not
> >>>>>>>> track[recTrack].midiMess[trackevent].splice(1);
> >>>>>>>>
> >>>>>>>> Isn't the later more readable, maybe it is just a personal preference?
> >>>>>>>> But if you replace the indexname with just the index, the former make no sense if you do not know the parameter order.
> >>>>>>>>
> >>>>>>>> But the later is still readable right out of the box?
> >>>>>>>> Well i could be wrong but i find the later more intuitive.
> >>>>>>>>
> >>>>>>>
> >>>>>>> Programming language syntax is just a way of writing down programming
> >>>>>>> semantics. Since you do not grasp the latter at all it is hard to
> >>>>>>> explain the former to you.
> >>>>>>> The syntactic alternative you propose is an expression of completely
> >>>>>>> different semantics.
> >>>>>>>
> >>>>>>> Elsewhere in this thread you boast about your own high IQ versus the low
> >>>>>>> IQ of people you do not understand. I am sure you will also not
> >>>>>>> understand what I said above and cope with that by calling me stupid.
> >>>>>>> The world must be a strange and hostile place for you.
> >>>>>>
> >>>>>> I do get that they try to keep the language minimalistic and do not want to reserve words.
> >>>>>>
> >>>>>> But one can questoin why use splice? who the fuck come up with that???
> >>>>>> Why not
> >>>>>> track[tracknr].midiMess[trackEvent].delete({time:instime,data0:144,data1:insnote,data2:insvel});
> >>>>>>
> >>>>>> and
> >>>>>> track[tracknr].midiMess[trackEvent].insert({time:instime,data0:144,data1:insnote,data2:insvel});
> >>>>>>
> >>>>>> Well i can tell you why they are anal ENTP fucks that feel smart, when they come up with splice which make the readability dependent of that you know the parameters.
> >>>>>>
> >>>>>> "Yeah feel smart.. but it is utterly stupid"
> >>>>>> Did they think they were saving something?
> >>>>>
> >>>>> Yeah it is methods on the elements you morons...
> >>>>
> >>>> You see you can't go wrong with element methods like
> >>>> arr[muppets].insert():
> >>>> arr[muppets].delete();
> >>>>
> >>>> No the stupid fucks want to be pioneering, by remove the index, replace "the real method names" with an akronym and throw in the index as a parameter and "call it array methods"
> >>>>
> >>>> You stupid fucks should not work with webdevelopment at all, go back to your blip blop cave.
> >>>
> >>> Yeah they can throw out the array methods splice and slice altogether from language and replace it with element methods, so one do not have to guess howto use them.
> >>>
> >>> arr[muppets].delete(4);
> >>> arr[muppets].insert(4,"A",7,"C",11);
> >>> arr[muppets].swap(muppets);
> >>> arr[muppets].swap(muppets+-x);
> >>> arr[muppets].calc(sqrt(arr(muppets)+3);
> >>>
> >>>
> >>
> >> You still do not get it do you, high IQ carrying one?
> >>
> >> If you would grasp the concept of instances and references you would not
> >> say this. Knowing that I am probably wasting my breath:
> >>
> >> var a = new Date(2017,2,11,12,30,10,0);
> >> var b = new Date(2018,2,11,12,31,20,0);
> >> var c = new Date(2016,3,5,9,0,45,0);
> >>
> >> var array1 = [a,b,c];
> >> var array2 = [c,b,a];
> >>
> >> array1[0].delete;
> >>
> >> is then the equivalent of:
> >>
> >> array2[2].delete;
> >>
> >> and of:
> >>
> >> a.delete
> >>
> >> See how this could never implement an operation on array1 or array2?
> >> Since a does not know "in" which array it is (in fact, it is "in" two
> >> arrays at the same time) it is impossible to implement an operation on
> >> the array via a itself. The arrays refer to a and not the other way around.
> >>
> >> Nah, forget it.
> > 
> > No i do not actually get the problem, here i push a "set of data" object?, it isn't refered by any name variable name just the array index is it still an object?
> > 
> >   track[tracknr].midiMess.push({time:clock,data0:message.data[0],data1:message.data[1],data2:message.data[2]});
> > 
> > Why would it be wrong to refer do the index when you remove it, do not fucking get it?
> > 
> > track[tracknr].midiMess[i].delete?
> > 
> > What is the problem, i can't even see there is one?
> > You mean the dataset would still exist elsewhere, is that whay you getting at?
> > Your point is lost for me.
> > 
> 
> After:
> 
> var a = new Date();
> var b = [a];
> 
> b[0].delete;
> 
> is equal to:
> 
> (b[0]).delete;
> 
> which is equal to:
> 
> var t = b[0];
> t.delete;
> 
> which is equal to:
> 
> a.delete;
> 
> In all three cases the delete is invoked on a and not on the array b 
> that holds a reference to a. So if delete is supposed to work on the 
> array, b, at some index, it has to be invoked on the array, hence the 
> notation:
> 
> b.delete(0)
> 
> Capiche?

I do not even see that what you say is relevant?
What is it you try to convey, how is it relevant. 

You show me some syntax and pretend it somehow god given?
Why should b[0].delete erase the object?
Because b is an array and it is the index that point at the object?

So why doesn't it delete the index pointer just?
I think you are confused honestly, maybe it some weird convoluted or polluted semi object oriented structure that confuse you?

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-21 21:53 -0700
  Re: Ideas behind programming language syntax choices? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-09-22 15:17 +0200
    Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-22 10:23 -0700
    Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-22 10:31 -0700
      Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-22 10:39 -0700
        Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-22 11:20 -0700
    Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-22 15:21 -0700
      Re: Ideas behind programming language syntax choices? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-09-23 09:14 +0200
        Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-23 00:23 -0700
          Re: Ideas behind programming language syntax choices? Maik Koenig <usenetspam@maikkoenig.de> - 2018-09-24 00:56 +0200
  Re: Ideas behind programming language syntax choices? Silvio <silvio@internet.com> - 2018-09-24 00:33 +0200
    Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-23 16:07 -0700
    Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-23 16:13 -0700
    Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-23 16:24 -0700
      Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-23 16:37 -0700
      Re: Ideas behind programming language syntax choices? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-09-25 19:52 +0100
        Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-25 12:15 -0700
          Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-25 12:35 -0700
            Re: Ideas behind programming language syntax choices? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-09-26 18:31 +0100
              Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-26 11:28 -0700
                Re: Ideas behind programming language syntax choices? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-09-27 10:49 +0100
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-27 03:38 -0700
                Re: Ideas behind programming language syntax choices? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-09-27 19:42 +0100
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-27 14:44 -0700
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-27 14:48 -0700
                Re: Ideas behind programming language syntax choices? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-09-28 21:04 +0200
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-10-02 12:47 -0700
                Re: Ideas behind programming language syntax choices? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-10-03 18:19 +0100
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-10-04 05:43 -0700
                Re: Ideas behind programming language syntax choices? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-10-05 18:17 +0100
                Re: Ideas behind programming language syntax choices? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-10-05 22:37 +0200
                Re: Ideas behind programming language syntax choices? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-10-06 14:30 +0100
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-10-07 09:57 -0700
                Re: Ideas behind programming language syntax choices? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-10-07 23:08 +0200
                Re: Ideas behind programming language syntax choices? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-10-08 19:43 +0100
                Re: Ideas behind programming language syntax choices? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-10-06 18:04 +0200
                Re: Ideas behind programming language syntax choices? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-10-07 10:14 +0100
                Re: Ideas behind programming language syntax choices? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-10-07 15:15 +0200
                Re: Ideas behind programming language syntax choices? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-10-09 10:38 +0100
                Re: Ideas behind programming language syntax choices? dr.s.lartius@gmail.com - 2018-10-09 08:27 -0700
                Re: Ideas behind programming language syntax choices? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-10-09 19:12 +0100
    Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-23 16:52 -0700
      Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-23 16:56 -0700
        Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-23 17:02 -0700
          Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-23 18:06 -0700
            Re: Ideas behind programming language syntax choices? Silvio <silvio@internet.com> - 2018-09-24 23:51 +0200
              Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-25 01:58 -0700
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-25 02:25 -0700
              Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-25 02:51 -0700
                Re: Ideas behind programming language syntax choices? Silvio <silvio@internet.com> - 2018-09-25 19:41 +0200
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-25 11:22 -0700
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-25 11:42 -0700
                Re: Ideas behind programming language syntax choices? Silvio <silvio@internet.com> - 2018-09-25 21:47 +0200
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-25 14:24 -0700
                Re: Ideas behind programming language syntax choices? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-09-25 23:37 +0200
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-25 14:46 -0700
                Re: Ideas behind programming language syntax choices? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-09-26 10:52 +0200
                Re: Ideas behind programming language syntax choices? Silvio <silvio@internet.com> - 2018-09-26 00:06 +0200
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-25 15:55 -0700
                Re: Ideas behind programming language syntax choices? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-09-26 10:58 +0200
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-26 02:48 -0700
                Re: Ideas behind programming language syntax choices? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-09-26 12:30 +0200
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-26 04:45 -0700
                Re: Ideas behind programming language syntax choices? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-09-26 04:53 -0700

csiph-web