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!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!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: Fri, 5 Apr 2013 20:38:59 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <1u72u7h5j4jg3$.wlxmaltyzqik.dlg@40tude.net> <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> <4hzv51v872q2$.1imijbwd7heqm$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1365212347 1327 69.95.181.76 (6 Apr 2013 01:39:07 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 6 Apr 2013 01:39:07 +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:14884 Date: 2013-04-05T20:38:59-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:pgrgoxdhtshv$.z253qtbqarkc.dlg@40tude.net... > On Fri, 5 Apr 2013 17:16:59 +0200, Stefan.Lucks@uni-weimar.de wrote: ... > I disagree. They wanted to prevent the mess of PL/1 where *arbitrary* > conversions were applied to semantically unrelated types. Types like > Character and Wide_Character are semantically related. Conversion from one > to another is perfectly well defined. All numeric types are semantically related. All array types are semantically related. But that doesn't mean that implicit conversions are a good idea even if they are well-defined. Every type that has a different representation has different semantics, and those differences are important in enough cases that implicit conversion between different representations is banned. This *is* an accurate description of Ada's design: you can't derive a numeric type that has primitive operations if you try to change its representation, and that's because the implicit conversions of inheritance were not to be allowed if the representation is different. (This is one of the things that makes Ada 83 derivation so utterly useless.) > Furthermore what Randy proposes will actually be worse than pitiful > Unbounded_String. For them you could at least do this: > > type Relative_File_Path is new Unbounded_String; > type Absolute_File_Path is new Unbounded_String; > > You could not do that for tagged strings. Right. You'd have to write: type Relative_File_Path is new Unbounded_String is null record; type Absolute_File_Path is new Unbounded_String is null record; Horrifyingly more complex. ;-) Randy.