Karpov, Walter and D

deadalnix deadalnix at gmail.com
Tue Feb 5 22:23:27 PST 2013


On Monday, 4 February 2013 at 23:24:46 UTC, Walter Bright wrote:
> On 2/4/2013 3:13 PM, bearophile wrote:
>>> The unsigned<0 is usually a bug when it appears in top level 
>>> code. However, it
>>> can legitimately appear as a boundary case inside of generic 
>>> code.<
>>
>> Then maybe it's possible to warn/error only about those 
>> comparisons that are
>> _not_ inside a template.
>
> I can see the bug reports on such an inconsistency already.
>
> As a general note, putting idiomatic rules into the language 
> like that makes it larger and significantly more difficult to 
> comprehend.

I have to concur. template and non template code must work the 
same way.

This is a perfect job for static code analyzer however.


More information about the Digitalmars-d-announce mailing list