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: border2.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!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: Your wish list for Ada 202X Date: Thu, 10 Apr 2014 17:39:39 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> <8bhozh836pyt$.1qctlysud0s2q$.dlg@40tude.net> <1cdsyxjzsfgzm.1synpaujysv21$.dlg@40tude.net> <1aa804jg9qq4o$.wdiq33yo621l.dlg@40tude.net> <1w6eh0aiksmdh$.1h16p7y0b8c6h.dlg@40tude.net> <17twpp4p8u7o$.1idvzaaio4f3t$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1397169580 12019 69.95.181.76 (10 Apr 2014 22:39:40 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 10 Apr 2014 22:39:40 +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 X-Original-Bytes: 4132 Xref: number.nntp.dca.giganews.com comp.lang.ada:185669 Date: 2014-04-10T17:39:39-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:17twpp4p8u7o$.1idvzaaio4f3t$.dlg@40tude.net... > On Wed, 9 Apr 2014 22:28:36 -0500, Randy Brukardt wrote: ... >>> Ada has no support for dynamic linking anyway, so it is how it is right >>> now. Introducing MD won't make bad any worse. >> >> MD isn't the problem; preference rules are the problem. > > That requires a proof which shows that no set of rules can exist that > fulfills the requirements X, Y, Z. So far it is word against word. Not > even > X, Y, Z is formulated. Actually, there was such a formal proof constructed during the design of Ada 9x. Unfortunately, that's pretty much all I remember about it, so it's not much help in this discussion. But it's quite clear that (sane) preference rules cause Beaujolias. Consider an expression node for which two choices (let's call them A and B) remain after eliminating obvious mismatches. (This situation can be common when literals are involved, as they match so many types). Ada of course makes the expression illegal in this case, specifically to avoid Beaujolias. But let's consider a preference rule instead. The rule choses A over B, and then the program is legal and runs. Now consider adding another operation C in some package that's referenced by the semantic closure ("with" in Ada) of our expression. Assume that C also is a possible choice for our expression node. If the preference rule picks C rather than A (or picks B for that matter), then we have the classic Beaujolias scenario when a legal program does something different because an operation is added to an unrelated package. It doesn't matter what the preference rule is, one can always construct such a scenario. Unless, of course, the preference rule depends on something other than the name and type profiles declared in the source code. Using temporal information would work, of course, but it would be a nightmare for portability, as starting a new project with the same source code would change that information and cause the program to run differently. I believe that any rule not involving the contents of the source code would have similar problems. The only time a preference rule is safe is if no user can add or delete operations for the types in question. That's why it's OK for univeral_integer. (It also means that future versions of the language can't add or delete operations for universal_integer, which might be a problem someday.) Randy.