Feature request: Optional, simplified syntax for simple contracts

Manu turkeyman at gmail.com
Mon Jun 17 19:38:15 PDT 2013


On 16 June 2013 12:22, TommiT <tommitissari at hotmail.com> wrote:

> On Sunday, 16 June 2013 at 00:19:37 UTC, Manu wrote:
>
>> Super awesome idea! How about coma separated expressions to perform
>> multiple asserts?
>>
>> int func(int i, int j) in(i<5, j<10)
>> {
>>   return i + j;
>> }
>>
>
> Do you mean ...to get more specific error messages than with in(i<5 &&
> j<10) ?
>

Error messages would be more useful, and it may be much easier for the
compiler/optimiser to use this information in the future as separated out
into distinct expressions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130618/ce212dea/attachment.html>


More information about the Digitalmars-d mailing list