DIP 1009--Improve Contract Usability--Preliminary Review Round 1

MysticZach via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 23 12:38:11 PDT 2017


On Friday, 23 June 2017 at 18:42:55 UTC, Steven Schveighoffer 
wrote:
> On 6/23/17 2:24 PM, Moritz Maxeiner wrote:
>> I'm all for this syntax, just one spec/implementation question:
>> If the new contract syntax (formally) shares grammar rules 
>> with assert, won't that cause more work for people who want to 
>> update the assert syntax later (since they will have to take 
>> contracts into account)?
>
> No. Asserts are the meat of in/out contracts, these are 
> actually asserts. Anything you do to the assert grammar should 
> be done here as well.

I agree. I can understand wanting to pass in/out violations to a 
different handler behind the scenes. But I don't see why that 
should affect the grammar.


More information about the Digitalmars-d mailing list