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!news4.google.com!feeder.news-service.com!news.astraweb.com!border3.a.newsrouter.astraweb.com!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 17 Aug 2010 17:07:27 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; 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> <95tc66hjv3stdk0nhdv9o46e5l2ecdog5j@4ax.com> <1b64e5c2-f3d5-41e9-99cb-70e92c074d33@q22g2000yqm.googlegroups.com> In-Reply-To: <1b64e5c2-f3d5-41e9-99cb-70e92c074d33@q22g2000yqm.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4c6aa5af$0$7658$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 17 Aug 2010 17:07:27 CEST NNTP-Posting-Host: 14bf5cdd.newsspool1.arcor-online.net X-Trace: DXC=G`c\Ngh2POhOKO]LCQ@0g`ic==]BZ:afn4Fo<]lROoRa<`=YMgDjhgbI3?B2M?cZ7gnc\616M64>jLh>_cHTX3jm:a^AVS3Bb7o X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:13458 Date: 2010-08-17T17:07:27+02:00 List-Id: On 17.08.10 15:37, Maciej Sobczak wrote: > On 17 Sie, 14:57, Warren wrote: >>> Try g++ -Wswitch. >> >> GCC extension. > > No, it is not an extension. It is a compiler option. > The language standard does not define what options the compiler should > support, so it does not make much sense to declare that some option is > an extension. All options are features of respective products and > products compete by offering different sets of features. Effectively, with this switch making GCC attempt case coverage, it seems a feature that while not available in C++, is, apparently, still desirable. Here is an observation, then, focusing on programmers and vendors, admittedly somewhat psychological: A compiler switch is a technique used in keeping face, establishing a cover-up. For C++ or for Ada, if the switch isn't turning on support for experimental language, it can be a hint at the presence of a deficiency. A "compiler switch" leaves the language of choice as "perfect" as it is; it leaves room for more or less reasonable hands-waving arguments. "The original C switch is great! Because ...". Duff's device comes to mind. "Not forbidden to check", "not unfeasable to support in a compiler", etc., fall in this category (for any language lacking features); I *want* fall-through! In real life, we see tools like lint and coding standards being added on top of the compiler. The purpose is: to pretend we keep using the old language, which is thus kept perfect, even when they rule out parts of the language or, well, extend it with compiler supplied interpretation. If we do not add rhetoric around the "difference between switch-language and LRM-language", we'll have to get real, throw out old junk and adapt---admit that we might foolishly have defended a stupid thing. There is a solution, see below. Unfortunately, one might say, Ada isn't dropping stuff either. As long as there is a handful of paying customers, I think, who allegedly want all new compilers for all old software... Not a tool capable of rewriting the old to the new. Fortunately, there is a backdoor that helps keeping face while dropping stuff from the Ada language, at least. The SPARK approach exemplifies. I still hope something similar is recognized in the C world. The solution is in the hands of those who pay compiler makers: Suppose industry customers decide on a set of requests: 1) Add good language features to the language where missing. 2) Remove bad language features where they create more trouble than anything else. 3) Force vendors to write good source code transformers, from old language to new language. After all, source code transformation is their business! Verifiable source code transformation is a hot subject, so potentially, there is money in it. Georg