On 07/31/2012 12:30 AM, maarten van damme wrote:
2012/7/31 Timon Gehr<timon.g...@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.

Reply via email to