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,73cb216d191f0fef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.68.222.98 with SMTP id ql2mr3271085pbc.3.1366381124486; Fri, 19 Apr 2013 07:18:44 -0700 (PDT) MIME-Version: 1.0 Path: bp1ni1480pbd.1!nntp.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!News.Dal.Ca!news.litech.org!news.etla.org!feeder.erje.net!eu.feeder.erje.net!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Mon, 15 Apr 2013 20:41:46 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <1gnmajx2fdjju.1bo28xwmzt1nr.dlg@40tude.net> <3gv2jwc95otm.pl2aahsh9ox8.dlg@40tude.net> <1gkxiwepaxvtt$.u3ly33rbwthf.dlg@40tude.net> <1fmcdkj58brky.bjedt0pr39cd$.dlg@40tude.net> <1bj564vat3q1j$.1s4d00rlzx4ux$.dlg@40tude.net> <8bj2k30k7i19.w7ehsldwbf7x.dlg@40tude.net> <1o34nhpfuy6yl$.2orlukd1elr7.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1366076510 22138 69.95.181.76 (16 Apr 2013 01:41:50 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 16 Apr 2013 01:41:50 +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-Received-Bytes: 4232 Date: 2013-04-15T20:41:46-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:gj0dksp3fqws$.15ahjs6oqwquj.dlg@40tude.net... > On Fri, 12 Apr 2013 19:22:36 -0500, Randy Brukardt wrote: ... > And the solution is to remove Append? What would be a "good" design of > Unbounded_String and String such that you never mixed them? Is there any? Not remove Append, but remove the version of Append that mixes two different types. The only operations that change types should be explicit conversions (possibly user-defined versions of that, using functions). > You missing the main point that whatever difference Unbounded_String and > String may have, it is not a semantic difference. Both are different > implementations of the same thing. They are mixed right from the start. Representation is an integral part of semantics. I strongly disagree that they're representations of the same thing, because that would imply that they do exactly the same thing for all operations -- and that's clearly not true. And this is crux of the issue -- we simply do not agree at this fundamental level about this topic, and I can't imagine any reason that either of us will change our positions here. So we're both wasting our time. ... >>> This is what you proposed. I did to avoid translations through support >>> of >>> mixed type operations. They do exactly that. >> >> But you're not eliminating anything. The only way to implement such mixed >> operations is via converting one or the other operands to the most >> general >> type. > > Wrong, a multi-method has a body for each combination of parameters. > >> In any case, multi-methods don't work given the existing Ada resolution >> rules. You want to fix that with preference rules, but those are a >> non-starter. > > You cannot know that without even trying to consider these rules or > alternatives to them. We've tried such rules to solve other problems several times in the past. They've almost never worked. And I don't care to try, I see no problem with the current state of affairs. It's on you to come up with a worked-out solution that you can propose. Otherwise, I'm certain that nothing you want to see will happen -- it isn't happening by magic. Randy.