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: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder2.enfer-du-nord.net!gegeweb.org!news.ecp.fr!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: Fri, 12 Apr 2013 19:35:07 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <1gkxiwepaxvtt$.u3ly33rbwthf.dlg@40tude.net> <1fmcdkj58brky.bjedt0pr39cd$.dlg@40tude.net> <1bj564vat3q1j$.1s4d00rlzx4ux$.dlg@40tude.net> <4hzv51v872q2$.1imijbwd7heqm$.dlg@40tude.net> <1htu9idmcci7x.1vr9eafeivqah$.dlg@40tude.net> <1q6gm7foi87kr.i2q54bm8sy83.dlg@40tude.net> <6ywdes8pgbd8$.alujya2d4454$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1365813313 9875 69.95.181.76 (13 Apr 2013 00:35:13 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 13 Apr 2013 00:35:13 +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: 5113 Xref: number.nntp.dca.giganews.com comp.lang.ada:181043 Date: 2013-04-12T19:35:07-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:6ywdes8pgbd8$.alujya2d4454$.dlg@40tude.net... > On Thu, 11 Apr 2013 17:37:31 -0500, Randy Brukardt wrote: > >> "Dmitry A. Kazakov" wrote in message >> news:1q6gm7foi87kr.i2q54bm8sy83.dlg@40tude.net... >> ... >>> In that case there is simply no alternative to multi-methods because >>> n-ary >>> operations do not have preferable argument. So what are you going to do >>> with this? You ditch operations, literals, slices. A great theory! >> >> Yup, operations that you don't need, and that are dangerous on top of >> that. >> You continually claim that you need multi-methods without a shred of >> proof. > > The list of operations required for strings was listed many times: > > function "&" (L, R : Root_String_Type) return Root_String_Type; > function "=" (L, R : Root_String_Type) return Boolean; > function "/=" (L, R : Root_String_Type) return Boolean; > function ">=" (L, R : Root_String_Type) return Boolean; > function "<=" (L, R : Root_String_Type) return Boolean; > function ">" (L, R : Root_String_Type) return Boolean; > function "<" (L, R : Root_String_Type) return Boolean; > function Overwrite (Source : in Root_String_Type); > Position : in Positive; > New_Item : in Root_String_Type) > return Root_String_Type); > > should I continue? It is hundreds of operations, literally. Hundreds? You've lost your mind. My rough proposal had 6 (not counting the operators). The vast majority of interesting operations should be class-wide, not primitive. That includes pretty much everything in the Ada.Strings.whatever packages. >Take into > account a huge set of multi-dispatch operation with containers of strings, > e.g. Character_Set and Character_Mapping. It is thousands of operations > you > want to overload? Drop altogether? I don't see this at all. The element type here is Wide_Wide_Character (only), since this is all about Unicode and there's no important reason to shorten the representation of singletons. So there's no multi-dispatch and all of the existing character sets and mappings can be used as they currently are defined. >> Changing/comparing different representations is something that a program >> should do very rarely, if at all. > > Give "a shred of proof" that Wide_Wide_String must have same > representation > as String. It doesn't have the same representation; they should never be used together. Give me any reason (beyond existing broken interfaces, which we would fix) that you should be mixing these two types. Either you're an "ugly American" (like me) that thinks Internationalization is mainly about keeping up the barriers between people - everyone should use English and forget everything else! For us, we'll just use String and we're already happy. For everyone else, they'll have to use Wide_Wide_String (or some new string type) everywhere. Converting to 8-bit just loses information, and that's a bug in many supposely internationalized programs. Randy.