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,a6fe9ef21ba269dc X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Sat, 14 Aug 2010 11:52:11 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada Smileys in C++ lib Conversion References: <1a9b39b0-73f6-497c-a8f4-abf8129886ac@t20g2000yqa.googlegroups.com> <9b88e5a4-c588-4997-ad5c-2efa216fe4f4@a4g2000prm.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4c66674c$0$6893$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 14 Aug 2010 11:52:12 CEST NNTP-Posting-Host: 98451661.newsspool2.arcor-online.net X-Trace: DXC=5_0M<`>h<;;L2C_`koXfC5A9EHlD;3Yc24Fo<]lROoR18kFejV8gUbC0Le8kS=Zb6eAdj9j:4 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:13268 Date: 2010-08-14T11:52:12+02:00 List-Id: On 8/14/10 3:36 AM, Warren wrote: > Heh heh. This is one of those things that C/C++ cannot > guard against at all. Unless the value(s) were to exceed > the underlying type's storage capability, the compiler > is helpless to identify it. There is simply no concept of > a "range" of valid values in that language. You might want to look at Maciej's demo of range checked types in C++, though. Since C++ programmers and language makers are fine with things defined in libraries, not language, they can point to programmers who just have to ... > But if you leave it up to programmers coding assertions, > then you know they won't exist everywhere they're needed. Bad programmers cannot be held responsible for a perfectly applicable language design when they don't know how to use the language properly;-) Georg