sorting failed error

Timon Gehr timon.gehr at gmx.ch
Mon Jul 30 15:58:28 PDT 2012


On 07/31/2012 12:30 AM, maarten van damme wrote:
> 2012/7/31 Timon Gehr<timon.gehr at gmx.ch>:
>> ...
>> further comments whose application does not lead to immediate benefit:
>>
>> - in contracts are better specified in their dedicated section to push
>> the requirements onto the caller.
>>
>> - consider for(;;) as a means for indefinite looping.
>>
>> - the convention is upper case for type names
>
> Thank you very much for this criticism, I'm relatively new to
> programming and these mistakes/points are the kind off things you
> can't learn from reading a book or two.
>

I'm glad to help.

> I have one little question about one of the last points though
> why use for(;;)?

Well, as stated, there is no benefit.

> As far as I can tell this simply reduces readability from while(true).

That is entirely a matter of preference.

> Is there any reason for this?

I like it more because it says "loop".
while(true) says: "loop as long as 'true' still holds", which is silly.


More information about the Digitalmars-d-learn mailing list