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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,70414f56d810c10c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.50.133 with SMTP id c5mr30063625pbo.2.1317150413979; Tue, 27 Sep 2011 12:06:53 -0700 (PDT) Path: lh7ni6134pbb.0!nntp.google.com!news1.google.com!news4.google.com!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: discriminant questions Date: Tue, 27 Sep 2011 21:06:53 +0200 Organization: cbb software GmbH Message-ID: 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> <4e8210ab$0$6550$9b4e6d93@newsspool4.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: EMY6V9w2JsuJ/8EEiAFEEw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18176 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-09-27T21:06:53+02:00 List-Id: On Tue, 27 Sep 2011 20:06:35 +0200, Georg Bauhaus wrote: > 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. A difference? > That is, I'm assuming that programmers want a loop construct > in Ada, not just goto. Or recursion, or callbacks from some hidden iteration loop? > I'm assuming that they don't want to have to define loop in > terms of goto, even when this has certain advantages. Do you think that they want to iterate containers using iterators? My point is that loop as primitive should apply to user-defined stuff, like containers. That means that the language should allow to "override" not only the loop's body, but also its continue-or-exit part. > 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. Sorry, but this is what parallel programming is about. > 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. Tasks are not equivalent to CAS, you cannot create a task using CAS. You need tasks independently on presence of CAS. > There is a staircase, so to speak, from very primitive features > up to more "heavy" features. No. There is a huge difference between what is "heavy" 1) for machine, 2) for programmer, 3) for customer. As an example take square root. Is it "primitive"? > 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: [...] Don't confuse language construction with the Hilbert's program! >> 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. While the field "pattern" is "double", it this what are you saying? Ada has a more general concept, which is not heavier than "double", neither for the hardware, nor for the programmer, nor for the customers. This is the right way to design a good language. >> 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? Heavy? Do you think that messages, channels, mutexes, events would be lighter? Anyway, the performance burden is not directly bound to being fundamental. E.g. static types as a generalization of data value are for free. > 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. Nope, the patterns used in embedded control systems I am dealing with are so rustic, that they better fit to an assembler or C. Ada is rocket science compared to them. >>> 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. All three represent language design bugs, what was the point? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de