Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-12 Thread Dmitry Olshansky via Digitalmars-d-announce
On Thursday, 12 April 2018 at 06:08:39 UTC, Kagamin wrote: On Wednesday, 11 April 2018 at 20:45:15 UTC, Dmitry Olshansky wrote: * Templates kind of muddy the waters being conpiled with the flags of caller (another reason why they are a mess). Meaning they will work with contracts if caller chos

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-11 Thread Kagamin via Digitalmars-d-announce
On Wednesday, 11 April 2018 at 20:45:15 UTC, Dmitry Olshansky wrote: * Templates kind of muddy the waters being conpiled with the flags of caller (another reason why they are a mess). Meaning they will work with contracts if caller choses to have debug build. Template can call user code, but

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-11 Thread H. S. Teoh via Digitalmars-d-announce
On Wed, Apr 11, 2018 at 08:45:15PM +, Dmitry Olshansky via Digitalmars-d-announce wrote: [...] > What would have made contract trully powerful for me is them being > emitted at caller side. This way if I use a release build of library > but debugging my app I still get my stupidity guarded by

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-11 Thread Dmitry Olshansky via Digitalmars-d-announce
On Friday, 6 April 2018 at 12:26:36 UTC, Mike Parker wrote: Congratulations to Zach Tollen and everyone who worked on DIP 1009. It took a painful amount of time to get it through the process, but it had finally come out of the other side with an approval. The proposal itself was approved early

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-11 Thread Zach Tollen via Digitalmars-d-announce
On Wednesday, 11 April 2018 at 16:16:33 UTC, Jonathan M Davis wrote: If we actually end up with a language improvement that makes it so that contracts are compiled in based on the caller instead of the callee, then I'll start using contracts. Until then, I'm not generally going to bother. My

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-11 Thread Jonathan M Davis via Digitalmars-d-announce
On Wednesday, April 11, 2018 07:47:14 H. S. Teoh via Digitalmars-d-announce wrote: > On Tue, Apr 10, 2018 at 11:43:00PM -0600, Jonathan M Davis via > Digitalmars-d-announce wrote: [...] > > > IMHO, for contracts to be worth much outside of the inheritance case, > > we'd need to do something like m

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-11 Thread H. S. Teoh via Digitalmars-d-announce
On Wed, Apr 11, 2018 at 05:23:58AM +, really? via Digitalmars-d-announce wrote: > On Friday, 6 April 2018 at 17:36:20 UTC, H. S. Teoh wrote: > > > > Yeah, I think having expression syntax will make contracts more > > readable. We'll just have to see. > > > > Sorry, but I fail to see how (1

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-11 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Apr 10, 2018 at 11:43:00PM -0600, Jonathan M Davis via Digitalmars-d-announce wrote: [...] > IMHO, for contracts to be worth much outside of the inheritance case, > we'd need to do something like make it so that contracts are compiled > in based on whether the caller used -release or not r

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-10 Thread Jonathan M Davis via Digitalmars-d-announce
On Wednesday, April 11, 2018 05:23:58 really? via Digitalmars-d-announce wrote: > On Friday, 6 April 2018 at 17:36:20 UTC, H. S. Teoh wrote: > > Yeah, I think having expression syntax will make contracts more > > readable. We'll just have to see. > > Sorry, but I fail to see how (1) is more reada

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-10 Thread really? via Digitalmars-d-announce
On Friday, 6 April 2018 at 17:36:20 UTC, H. S. Teoh wrote: Yeah, I think having expression syntax will make contracts more readable. We'll just have to see. Sorry, but I fail to see how (1) is more readable than (2) (1) in(s.length > 0, "s must not be empty") (2) in { assert(s.length > 0

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-09 Thread Timon Gehr via Digitalmars-d-announce
On 07.04.2018 00:45, Timon Gehr wrote: On 06.04.2018 19:36, H. S. Teoh wrote: On Fri, Apr 06, 2018 at 05:02:54PM +, Adam D. Ruppe via Digitalmars-d-announce wrote: On Friday, 6 April 2018 at 16:57:21 UTC, Jonathan M Davis wrote: Now, if the contracts ended up in the documentation or someth

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-09 Thread Zach Tollen via Digitalmars-d-announce
On Saturday, 7 April 2018 at 16:10:41 UTC, Jacob Carlborg wrote: What's the philosophy around accepted DIPs containing multiple suggestions/alternatives. For example, this DIP mentions three alternatives for the "out" syntax [1], it's not crystal clear which one was actually accepted. I think

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-07 Thread Zach Tollen via Digitalmars-d-announce
On Saturday, 7 April 2018 at 20:06:19 UTC, Jordan Wilson wrote: Although https://dlang.org/spec/contracts.html will surely be updated with this new syntax, I think a blog post would also help in this regard, I think. Jordan That's a good idea. I'll start on one.

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-07 Thread Jordan Wilson via Digitalmars-d-announce
On Friday, 6 April 2018 at 21:31:42 UTC, Zach Tollen wrote: I think we've now given Design-by-Contract a really good chance of becoming commonly used in the D wild. Let's see what happens! Although https://dlang.org/spec/contracts.html will surely be updated with this new syntax, I think a

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-07 Thread Jacob Carlborg via Digitalmars-d-announce
On 2018-04-06 14:26, Mike Parker wrote: Congratulations to Zach Tollen and everyone who worked on DIP 1009. It took a painful amount of time to get it through the process, but it had finally come out of the other side with an approval. The proposal itself was approved early on, but it needed qu

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-06 Thread Timon Gehr via Digitalmars-d-announce
On 06.04.2018 19:36, H. S. Teoh wrote: On Fri, Apr 06, 2018 at 05:02:54PM +, Adam D. Ruppe via Digitalmars-d-announce wrote: On Friday, 6 April 2018 at 16:57:21 UTC, Jonathan M Davis wrote: Now, if the contracts ended up in the documentation or something My documentation generator suppor

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-06 Thread Per Nordlöw via Digitalmars-d-announce
On Friday, 6 April 2018 at 12:26:36 UTC, Mike Parker wrote: Congratulations to Zach Tollen and everyone who worked on DIP 1009. It took a painful amount of time to get it through the process, but it had finally come out of the other side with an approval. The proposal itself was approved early

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-06 Thread Zach Tollen via Digitalmars-d-announce
On Friday, 6 April 2018 at 12:26:36 UTC, Mike Parker wrote: Congratulations to Zach Tollen and everyone who worked on DIP 1009. Thanks. People reading the announcement should know that this DIP was almost completely the result of a team effort. My original draft was subject to significant and

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-06 Thread H. S. Teoh via Digitalmars-d-announce
On Fri, Apr 06, 2018 at 05:02:54PM +, Adam D. Ruppe via Digitalmars-d-announce wrote: > On Friday, 6 April 2018 at 16:57:21 UTC, Jonathan M Davis wrote: > > Now, if the contracts ended up in the documentation or something > > My documentation generator supports contracts, but I found in > pra

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-06 Thread Adam D. Ruppe via Digitalmars-d-announce
On Friday, 6 April 2018 at 16:57:21 UTC, Jonathan M Davis wrote: Now, if the contracts ended up in the documentation or something My documentation generator supports contracts, but I found in practice, most of them are so illegible it doesn't actually help any to include them, so I never do.

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-06 Thread Jonathan M Davis via Digitalmars-d-announce
On Friday, April 06, 2018 08:00:42 H. S. Teoh via Digitalmars-d-announce wrote: > On Fri, Apr 06, 2018 at 12:26:36PM +, Mike Parker via Digitalmars-d- announce wrote: > > Congratulations to Zach Tollen and everyone who worked on DIP 1009. It > > took a painful amount of time to get it through

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-06 Thread H. S. Teoh via Digitalmars-d-announce
On Fri, Apr 06, 2018 at 12:26:36PM +, Mike Parker via Digitalmars-d-announce wrote: > Congratulations to Zach Tollen and everyone who worked on DIP 1009. It > took a painful amount of time to get it through the process, but it > had finally come out of the other side with an approval. WOOHOO!

Re: DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-06 Thread Martin Tschierschke via Digitalmars-d-announce
On Friday, 6 April 2018 at 12:26:36 UTC, Mike Parker wrote: Congratulations to Zach Tollen and everyone who worked on DIP 1009. It took a painful amount of time to get it through the process, but it had finally come out of the other side with an approval. The proposal itself was approved early

DIP 1009 (Add Expression-Based Contract Syntax) Accepted

2018-04-06 Thread Mike Parker via Digitalmars-d-announce
Congratulations to Zach Tollen and everyone who worked on DIP 1009. It took a painful amount of time to get it through the process, but it had finally come out of the other side with an approval. The proposal itself was approved early on, but it needed quite a bit of revision to get to an accep