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: 103376,635cd9622b25ae59 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsdst02.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr14.news.prodigy.com.POSTED!4988f22a!not-for-mail From: Newsgroups: comp.lang.ada References: <1146143954.169807.207080@t31g2000cwb.googlegroups.com> <1146148380.102042.119860@y43g2000cwc.googlegroups.com> Subject: Re: Type safety, C++ and code generation X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response Message-ID: NNTP-Posting-Host: 70.134.98.98 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr14.news.prodigy.com 1146408020 ST000 70.134.98.98 (Sun, 30 Apr 2006 10:40:20 EDT) NNTP-Posting-Date: Sun, 30 Apr 2006 10:40:20 EDT Organization: SBC http://yahoo.sbc.com X-UserInfo1: [[PGW^WETZSMB_DX]BCBNWX@RJ_XPDLMN@GZ_GYO^BSZUSAANVUEAE[YETZPIWWI[FCIZA^NBFXZ_D[BFNTCNVPDTNTKHWXKB@X^B_OCJLPZ@ET_O[G\XSG@E\G[ZKVLBL^CJINM@I_KVIOR\T_M_AW_M[_BWU_HFA_]@A_A^SGFAUDE_DFTMQPFWVW[QPJN Date: Sun, 30 Apr 2006 14:40:20 GMT Xref: g2news2.google.com comp.lang.ada:4000 Date: 2006-04-30T14:40:20+00:00 List-Id: "Maciej Sobczak" wrote in message news:e2qn8t$n13$1@sunnews.cern.ch... > > What about making different types really distinct? > > typedef ranged_type R1; > typedef ranged_type R2; > typedef ranged_type R3; > > > Above, R1 and R2 are *equal* to the compiler, but R3 is distinct from the > other two. This example raises the issue of structural equivalence versus name equivalence. In Ada R1 and R2 would not be equivalent. Ada is designed for name equivalence. Most other languages are designed for structural equivalence. In this respect, Ada continues to be just a wee bit more type safe than languages designed for structural equivalence. Richard Riehle