Re: DIP 1009--Improve Contract Usability--Formal Review

2017-08-30 Thread MysticZach via Digitalmars-d
On Wednesday, 30 August 2017 at 14:05:40 UTC, Mark wrote: I see that in the previous review rounds some people suggested various keywords for designating the return value of a function ("return", "result", ...) in an `out` contract. What about using a plain old underscore? For example: int

Re: DIP 1009--Improve Contract Usability--Formal Review

2017-08-30 Thread Mark via Digitalmars-d
On Wednesday, 30 August 2017 at 14:57:38 UTC, Moritz Maxeiner wrote: On Wednesday, 30 August 2017 at 14:05:40 UTC, Mark wrote: [...] int abs(int x) out(_ >= 0) { return x>0 ? x : -x; } The ambiguity issue of having two results in one scope [1] applies. [1]

Re: DIP 1009--Improve Contract Usability--Formal Review

2017-08-30 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 30 August 2017 at 14:05:40 UTC, Mark wrote: [...] int abs(int x) out(_ >= 0) { return x>0 ? x : -x; } The ambiguity issue of having two results in one scope [1] applies. [1] http://forum.dlang.org/post/oihbot$134s$1...@digitalmars.com

Re: DIP 1009--Improve Contract Usability--Formal Review

2017-08-30 Thread Mark via Digitalmars-d
On Wednesday, 30 August 2017 at 12:26:43 UTC, Mike Parker wrote: The first stage of the formal review for DIP 1009 [1], "Improve Contract Syntax", is now underway. From now until 11:59 PM ET on September 13 (3:59 AM GMT on September 14), the community has the opportunity to provide last-minute

DIP 1009--Improve Contract Usability--Formal Review

2017-08-30 Thread Mike Parker via Digitalmars-d
The first stage of the formal review for DIP 1009 [1], "Improve Contract Syntax", is now underway. From now until 11:59 PM ET on September 13 (3:59 AM GMT on September 14), the community has the opportunity to provide last-minute feedback. If you missed either of the two preliminary review