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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,70414f56d810c10c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!192.71.180.34.MISMATCH!newsfeed1.swip.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 27 Sep 2011 20:06:35 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: discriminant questions References: <9f37b726-d80b-4d24-bf3f-28a14255f7fd@s20g2000yql.googlegroups.com> <14tiipigyejtc$.hyp7e82egqwq$.dlg@40tude.net> <34d856bd-19a3-4bbf-b9d8-c0f100000ef4@k7g2000vbd.googlegroups.com> <1tpl2pc36ptr4$.txv4v3wmkjlm.dlg@40tude.net> <1malv6h6q31j3.uz9ws5j0glnm.dlg@40tude.net> <4e81a2f4$0$7624$9b4e6d93@newsspool1.arcor-online.net> <4e81e788$0$6542$9b4e6d93@newsspool4.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4e8210ab$0$6550$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 27 Sep 2011 20:06:36 CEST NNTP-Posting-Host: d155c02a.newsspool4.arcor-online.net X-Trace: DXC=8[^Y5NcR:m:gP]QSEBQ^d44IUK:D09nc\616M64>:Lh>_cHTX3j=1bNbLX[:W>? X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:22118 Date: 2011-09-27T20:06:36+02:00 List-Id: On 27.09.11 17:38, Dmitry A. Kazakov wrote: > On Tue, 27 Sep 2011 17:11:03 +0200, Georg Bauhaus wrote: > >> On 27.09.11 14:14, Dmitry A. Kazakov wrote: >>> On Tue, 27 Sep 2011 12:18:28 +0200, Georg Bauhaus wrote: >>> > [...] >> So you end up explaining tasks >> and protected objects anyway. And you might be able to explain >> why seemingly advantageous "primitives" like "concurrent" and >> "lock" had been preferred to a library based approach. > > As another example take elliptic integral of the first kind: F(x,k). I had been talking about programming constructs, not specialized mathematical functions that may or may not be expressed in terms of more primitive mathematical functions. The latter is quite interesting, but might be seen as an experiment that should finally arrive at some language, not just experimental libraries treated as language. That is, I'm assuming that programmers want a loop construct in Ada, not just goto. I'm assuming that they don't want to have to define loop in terms of goto, even when this has certain advantages. Or rely on libraries to supply "loop", not just the compiler. I'm assuming that if programmers always had to build (or have someone do it for them) specific concurrency constructs out of concurrency primitives, than this is too time consuming. A libraries approach seems like a kludge, too. The of mine, quoted above, came out wrong: it should say that "task" and "protected object" were chosen, not CAS or some such, with libraries around it. There is a staircase, so to speak, from very primitive features up to more "heavy" features. By *default*, I'd rather not force programmers to always go down to the basement. And hope that the libraries at upper floors are just as good as what a language will normally make the compiler do. Yes, in Ada 2012 we may reinvent basics in terms of more primitive language features such as conditional goto, 'Succ/'Pred, and and increment and decrement operations: type Nat is range 0 .. System.Max_Int; function "+" (Left, Right: in out Nat) return Nat is Y : Nat := 0; begin Copy (Target => Y, Source => Left); <> if Right /= 0 then goto B; end if; goto C; <> Y := Nat'Succ (Y); Right := Nat'Pred (Right); goto A; <> return Y; end "+"; assuming a suitable definition of Copy. I like it better when Ada provides more than primitive built-ins. Goto and libraries could provide a user-definable interface for defining "loop". I don't think programmers would ever care. Rules for defining language primitives in libraries might add some openness. I truest that there will be overlap between two sets of computer professionals, then: A := { Authors of compilers } B := { Authors of future library } A and B = A? What is n in |A| - |A and B| = n% ? > Why > bother to with subprograms, accuracy of real types, real types themselves, > approximation techniques for such a simple thing? Ada's way of specifying fundamental types refers to concepts relatively far away from hardware, IMO. The expression range 0.0 .. 100.0 is language. Thankfully, I don't have to follow some interface of defining range types myself, interesting as it might be. I'm also not sure that all Ada programmers will like it if the very process of interpreting "range .. " is moved to libraries. > The answer to your question was given by Occam 700 years ago. How much hair would the rasor have cut from Ada's definition of its heavy concurrency primitives? Iverson and the makers of S (and R) have begged to differ as regards the "reach" of primitives. The big money insurance industry says they were right. (And, please, temporary success or failure of this or that branch of industry is not an argument against language design unless there is a causal relation.) A question related to the "reach" of features: Are there patterns of programming embedded control software that could very well be reflected in language features? I think they are, but not in Ada, which is too primitive here. >> At Ada-auth, they usually say something about customer response to >> implementation defined pragmas and such. > > Customer response to the language standard? Are you joking? Response to experimental features such as pragma Assert; contracts specified with pragma Precondition and such; or conditional expressions, I think.