DMD 0.166 release

Walter Bright newshound at digitalmars.com
Sat Sep 2 12:22:45 PDT 2006


Derek Parnell wrote:
> On Fri, 01 Sep 2006 10:59:18 -0700, Walter Bright wrote:
> 
>>> suggestion that in/out/inout be 
>>> specified at the call side as well.
>> Yes, it would be the same. But I think the interface should be set by 
>> the definition, not the use. 
> 
> Yes we agree. But the purpose of this suggestion is not to 'set the
> definition' but to 'document the usage' of the definition. The purpose is
> to help both the compiler and human reader to validate the intention of the
> coder. The definition would still be set when declaring the function but if
> the compiler optionally allowed parameter storage class keywords at the
> point of invocation, you could help ensure that the coder is doing what she
> intended to do. It is a form of DbC.

Setting the behavior at both the point of definition and point of use 
may result in fewer programming bugs, it does so at the risk of making 
modifications harder and annoying programmers.

>> That's the usual practice with programming 
>> languages, and I've never seen it raised as an issue before.
> 
> So what? You are in the wonderful position of creating a useful and superb
> tool that can be very special. You have been a trail blazer and can
> continue to be one.

If people don't like adding { } around the lazy expressions, they aren't 
going to like putting 'lazy' in front of them, either. Every time I've 
seen a feature like this, the complexity was at the definition point, 
*not* the use point.



More information about the Digitalmars-d-announce mailing list