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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.albasani.net!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: operation can be dispatching in only one type Date: Wed, 2 Dec 2015 13:27:14 -0600 Organization: JSA Research & Innovation Message-ID: References: <04eb6626-644b-4b16-a329-c35659a9fbe2@googlegroups.com> <1ephv5ugr5mib$.9ehadf3dddct$.dlg@40tude.net> <1nf8wc05tjtvf$.1ctjb9hsr0qsp.dlg@40tude.net> <8132c558-aec2-41f4-8024-4a75a2d497ae@googlegroups.com> <17c8a7kqoxvff.aa1raqev6xlu$.dlg@40tude.net> <75a4c7be-391d-4e5d-9e6e-23607132c943@googlegroups.com> <343b78d1-c1ba-40d3-af80-e18de45f2e3d@googlegroups.com> <11das66l3vhic$.1stkau3dqp6ld.dlg@40tude.net> <6y03ogx0fsk8$.n0ldd6cud931$.dlg@40tude.net> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1449084435 12605 24.196.82.226 (2 Dec 2015 19:27:15 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 2 Dec 2015 19:27:15 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:28621 Date: 2015-12-02T13:27:14-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:6y03ogx0fsk8$.n0ldd6cud931$.dlg@40tude.net... > On Mon, 30 Nov 2015 16:22:12 -0600, Randy Brukardt wrote: ... >> To the extent that there is information that the compiler doesn't >> have, the focus should be on giving it that information, not on telling >> it >> what to do. (For instance, it is better to tell a compiler which >> subprograms >> are "hot" than to tell it that it must inline certain subprograms -- >> inlining is just one possibly way of improving the performance and the >> compiler is in a better position to juggle the trade-offs than any >> programmer could be. That's one of the reasons that just-in-time >> compilation >> produces better performance than one would imagine just based on >> traditionally compiling individual subprograms.) > > Not exactly. It is true when we talk about non-functional requirements and > wrong for the functional ones. The example with inlining works because it > is non-functional. "Functional" requirements are the entire point of the program and of course have to be described to the compiler. It's not the compiler's job to guess functional requirements! It would be writing your program for you in that case, and that only works in very limited circumstances (not for a general programming language like Ada). That includes all interfacing to things outside of the compiler's universe (that includes all of your other examples, such as streaming, DB access, etc.) After all, it's not "raw memory" if it is involved in functional requirements. Randy.