comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Ada Smileys in C++ lib Conversion
Date: Tue, 17 Aug 2010 17:07:27 +0200
Date: 2010-08-17T17:07:27+02:00	[thread overview]
Message-ID: <4c6aa5af$0$7658$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <1b64e5c2-f3d5-41e9-99cb-70e92c074d33@q22g2000yqm.googlegroups.com>

On 17.08.10 15:37, Maciej Sobczak wrote:
> On 17 Sie, 14:57, Warren <ve3...@gmail.com> 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



  reply	other threads:[~2010-08-17 15:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-13 14:20 Ada Smileys in C++ lib Conversion Warren
2010-08-13 15:06 ` Yannick Duchêne (Hibou57)
2010-08-13 16:53 ` Anh Vo
2010-08-14  1:36   ` Warren
2010-08-14  9:52     ` Georg Bauhaus
2010-08-14 10:57     ` Brian Drummond
2010-08-14 20:34       ` Maciej Sobczak
2010-08-14 21:01         ` Dmitry A. Kazakov
2010-08-15  1:16         ` Brian Drummond
2010-08-15 10:04           ` Maciej Sobczak
2010-08-16 12:08             ` Brian Drummond
2010-08-16 12:13               ` Georg Bauhaus
2010-08-16 12:30             ` Brian Drummond
2010-08-16 12:39               ` Maciej Sobczak
2010-08-16 21:39                 ` Brian Drummond
2010-08-16 22:53                   ` Robert A Duff
2010-08-24 10:12           ` David Thompson
2010-08-30  9:51             ` Brian Drummond
2010-08-16 14:54       ` Warren
2010-08-16 20:27         ` Maciej Sobczak
2010-08-17 12:57           ` Warren
2010-08-17 13:37             ` Maciej Sobczak
2010-08-17 15:07               ` Georg Bauhaus [this message]
2010-08-18 17:31               ` Warren
2010-08-24 10:12             ` David Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox