comp.lang.ada
 help / color / mirror / Atom feed
From: "yannick.moy" <yannick.moy@gmail.com>
Subject: Re: A split between two kinds of Ada programmers?
Date: Fri, 16 Mar 2012 08:42:06 -0700 (PDT)
Date: 2012-03-16T08:42:06-07:00	[thread overview]
Message-ID: <19696065.1106.1331912526684.JavaMail.geo-discussion-forums@vbut24> (raw)
In-Reply-To: <4f61f7a3$0$6562$9b4e6d93@newsspool4.arcor-online.net>

Hi Georg, I implemented the -gnatw.t warning and the above patch, so I can tell you what our objective is.

On Thursday, March 15, 2012 3:07:30 PM UTC+1, Georg Bauhaus wrote:

> Can a project use -gnatw.t when integrating source text written
> by both kinds of programmers?

The compiler is there to help honest programmers, not to defeat malicious ones. If you want to guard against misuse of any feature in Ada, best use a coding standard checker such as GNATcheck. Here you could have a rule that no precondition or postcondition is the static literal "True" or "False".

Note that GNAT still warns about statically true or false preconditions and postconditions, for example if you write it "My_True_Constant" or "1 > 0".

> Remembering Eiffel, it seemed somewhat common to just say the
> equivalent of Post => True when one wanted to defer thinking about
> what the post condition should really be.

For this and other uses, it is not helpful that the compiler warns about 
   Pre => True
or 
   Post => False
hence the modification of -gnatw.t that you saw.



  reply	other threads:[~2012-03-16 15:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15 14:07 A split between two kinds of Ada programmers? Georg Bauhaus
2012-03-16 15:42 ` yannick.moy [this message]
2012-03-16 19:17   ` Georg Bauhaus
replies disabled

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