From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.102.40 with SMTP id fl8mr18798759pab.4.1433019176924; Sat, 30 May 2015 13:52:56 -0700 (PDT) X-Received: by 10.140.29.119 with SMTP id a110mr193245qga.20.1433019176635; Sat, 30 May 2015 13:52:56 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!h15no862286igd.0!news-out.google.com!k20ni45033qgd.0!nntp.google.com!z60no4723261qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 30 May 2015 13:52:56 -0700 (PDT) In-Reply-To: <1066il1b5nk21.ioykgza5bnsw.dlg@40tude.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=105.237.62.132; posting-account=orbgeAkAAADzWCTlruxuX_Ts4lIq8C5J NNTP-Posting-Host: 105.237.62.132 References: <59a4ee45-23fb-4b0e-905c-cc16ce46b5f6@googlegroups.com> <46b2dce1-2a1c-455d-b041-3a9d217e2c3f@googlegroups.com> <3277d769-6503-4c7f-885f-3a730762b620@googlegroups.com> <9fa68fb7-89f0-42b3-8f25-20e70cb34d63@googlegroups.com> <87egm3u662.fsf@adaheads.sparre-andersen.dk> <20c56bea-2803-4aa9-a626-2d25e480df20@googlegroups.com> <1dmgofrqo3xn5$.1p4241xr4z92p.dlg@40tude.net> <1066il1b5nk21.ioykgza5bnsw.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Build language with weak typing, then add scaffolding later to strengthen it? From: jan.de.kruyf@gmail.com Injection-Date: Sat, 30 May 2015 20:52:56 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:26109 Date: 2015-05-30T13:52:56-07:00 List-Id: On Saturday, May 30, 2015 at 6:40:59 PM UTC+2, Dmitry A. Kazakov wrote: > I think this is untrue. Mathematical descriptions are based on the langua= ge > of mathematics. Actually there are a lot of such languages depending on t= he > sets of axioms taken and the methods of proofs considered acceptable, e.g= . > constructive mathematics etc. But that is beside the point, which is that > whatever mathematical language you took, it is far more powerful than any > programming language because its "computational" framework is infinite, > sometimes uncountable infinite etc. Trivial mathematical descriptions may > be incomputable, thus whatever elegancy of triviality they posses, you > could not express that in any programming language. And conversely, trivi= al > things in a programming language might be quite impossible to describe > mathematically. E.g. anything that involves constraints. For example, bru= te > force methods working fine just because it is a finite number of states. The Dijkstra - Wirth school differs from you here, whether justified or not= I cannot say, I am not a trained mathematician. All I can say is that=20 1. they came to their conclusions mainly because of their experience teachi= ng undergraduates and through struggling with the matter themselves. 2. that I personally work a lot easier in a well defined elegant language. 3. Some great discoveries in computer science were made in those days by ap= plying their homegrown mathematical rules. it is fascinating reading. At the same time I gladly give you that something as strictly defined as th= at does not fit well with Windows or Linux or you name it. I am doing a ker= nel module adaption at the moment and also Ada and Linux kernel fit very ba= dly. >=20 > Or pattern matching languages, or relational algebra languages, elegant t= o > someone's, should I say pervert, mind and unusable for decent software > developing. Yes I did try to make emacs behave on the odd occasion, but then I did not = want to destroy the quote since it brings some worthwhile issues to debate. >=20 > > Other ways to describe this aspect are to say that the language should > > have an inherent simplicity and be easy to learn, expressive and > > orthogonal. Expressiveness is the power of a language to solve problems= . >=20 > That yardstick is too crude. Most languages are Turing-complete, you can > solve any solvable problem in practically any programming language. True but not all are easily applied to a particular problem. Ada is very ni= ce for big technical projects, C is good if you want curly brackets, Oberon= is excellent when you dont know yet which language fits best, because you = make up what you need out of the lowlevel blocks, but as soon as there is a= n operating system involved you are stuffed again.=20 So perhaps the expressiveness and the simplicity are in relation to the pro= blem you want to solve. >=20 > > Orthogonality requires combinations of legal constructs to be themselve= s > > legal constructs." >=20 > I understand the intention, but taken literally this is an evident rubbis= h. > There are certain rules (an algebra) to apply to the language entities in > order to obtain new entities. It is not just combinations (there are > operations in the algebra) and not any combinations (there are constraint= s > to which operations apply to which entities, yep, those pesky types again= ). > =20 I am with you but Perhaps he means to say something, more in relation to the dangling else an= d similar issues. An if then else might be legal, but the combination of 2 = of them might not be in some circumstances. After all this piece of text was written for an undergraduate class. > Of course it is the semantics which makes these 99.9%. Of course the > popularity vote disregards semantics and see if there are curly brackets > here. I note that here we move away from computer science and into woollen socks = science. (Named after the habitual foot wear of the members of faculty) i.e. we will have to look at social science for an answer here.=20 I am attracted to the D-W school exactly because it was shaped by the daily= interaction with dumb people. Although Wirth might deny that. We may sit and talk here till the cows come home, but the convincing argume= nts will only come about in discussion with the curly bracket programmers. > We can safely say that Ada is far more readable than EBNF. Even highly > trained people could not say whether given sequence were legal according = to > given EBNF. I just meant to say that I am comfortable using the EBNF as a reference to = Oberon. It tells me everything I need to know in almost all cases. I just had a giggle and tried to look up "pure" in the bnf. It is not there= . Then I went back to the index which referred me to some place about 10 li= nes below where I should have read.On reading the right section I decided b= etter wait until tomorrow when I am fresh, my digestion will work better. S= o all in all I might perhaps say that the social sciences where not involve= d when the ARM was written, because believe it or not, there are certain ed= iting rules that promote clarity. This is not to drag the ARM editors down, its just to point out that logica= lly it is no doubt correct, but there are almost no people whose first lang= uage is "logic". >=20 > > But the crowd likes to turn this into a language war around every corne= r, >=20 > Not really. What I am trying to stress is that problems lie elsewhere. > These problems are huge and nobody gives a damn. Curly brackets that's > important! I was not blaming you really. But it does get annoying when a person has to= take a week fighting all kind of attacks, just to get the crowd to do at l= east some reflexion on where we all are going with Ada.=20 And based on social science I would say that the picture is not good. But t= hen there is a lot of money behind it from a source that will never dry up = (armaments) >=20 > He himself wrote as a title: Algorithms + Data Structures =3D Programs Yes I got that book. What it covers is not bad, What is left out is the pro= blem. But types hardly belong there. They are in chapter 2, 8, 9, 11 and 12 of th= e undergraduate book (at least in the Oberon version of those books) He turns that issue over and over and over until it is correct and elegant.= =20 That is not to say we cant expand on it, but the basis and more importantly= the reason why, are there. > There is never too many types. It is simply so that you probably confined > to the idea of algorithms and data being programs. >=20 My first experience of the issue was when I was barely literate in basic an= d started to do assemlby. I learned then to draw some circles representing = the functions (algorithms if you like) and lines connecting them, represent= ing function calls. In those function-call-lines I used to draw a big spiel, meticulously speci= fying the data that was exchanged. Those interfaces were much bigger than a= ny of the rest. That was my first experience with (homegrown) typing of my = data. And it worked like a bomb. All of a sudden I saw structure. This was = long before the universities tought anything like it.=20 So I am all for types, they bring clarity and abstraction in my programs, t= hey might indicate units for physical quantities etc. But once we get to the very same unsigned quantity or menory address define= d in 5 different places by 5 different people who then at the last minute q= uickly made a kludge to be able to read each others data, then I say let ty= pes be damned. I need to get on with the job here.=20 >=20 > Even in c.l.a lot of people honestly believe in that idea. Then GNAT was > started in Ada 83 times. And even now Ada's type system is too weak to > express great many things. That is how you get Unchecked_Conversion, acce= ss > types and Constraint_Error. >=20 Yes I am aware of your work with unit measures. So there I agree. But when = the programmers just use types cause you need to use types cause the boss s= ays so, then the problem is not having this type or that type, then the pro= blem is a lack of knowledge, clarity and elegance in the methods those prog= rammers have been taught. This problem can only be fixed by taking there to= ys away from them for a bit. Then all the typing becomes meaningless, and suprise suprise gnat also suff= ers of that. I posted an example the other day involving passing a string t= o printk. I am aware that part of gnat is quite old, but then we come to the issue of= the vested interests, which also must be listened to of course, but that i= s not about language that is about money. So we will have to see how the 2 = can meet. cheers, j.