assert semantic change proposal

via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 6 00:38:48 PDT 2014


On Wednesday, 6 August 2014 at 07:19:21 UTC, Andrei Alexandrescu 
wrote:
> The quoted code is considered an antipattern at least e.g. at 
> my workplace.

What about:

«
if(x==0){ …free of x…}
…free of x…
assume(x!=0)
»

being equivalent to

«
assume(x!=0)
if(x==0){ …free of x…}
…free of x…
»

> I think we're at the point where everybody understands one 
> another

Really? I am the point where I realize that a significant portion 
of programmers have gullible expectations of their own ability to 
produce provably correct code and a very sloppy understanding of 
what computing is.

So now we don't have Design by Contract, but Design by Gullible 
Assumptions.

Great…


More information about the Digitalmars-d mailing list