Re: Nov 16 - Memory Safety and the D Programming Language

2016-11-20 Thread Walter Bright via Digitalmars-d-announce

On 11/14/2016 1:39 AM, qznc wrote:

On Monday, 14 November 2016 at 06:57:07 UTC, Walter Bright wrote:

ยท Follow our YouTube channel.


So, there will be a recording? Great!



Unfortunately, the audio was lost 18 minutes in. Looks to be not worth posting. 
I do have the slides up, though.


http://www.walterbright.com


Re: DIP 1003: remove `body` as a keyword

2016-11-20 Thread Chris Wright via Digitalmars-d-announce
On Sun, 20 Nov 2016 14:35:16 +1300, rikki cattermole wrote:
> I was thinking maybe option 3 but not have the body first.
> 
> int func(int arg) {
>   return 8 * arg;
> } in {
>   assert(arg > 0);
> } out(int value) {
>   assert(1);
> }
> 
> Would break code but its a simple rearrangement.

Right now, the normal flow when reading a function is:

* Doc comment: What did the author think important for me to know?
* Signature: How do I call it so the compiler will accept it?
* In contract: What sort of parameters are acceptable?
* Out contract: What invariants apply to the result?
* Body: I only need to read this if the rest didn't help.

This is ordered by importance.

By hanging the contracts off the end, you're making them harder to 
notice. That's not ideal.