using ! or == false? your preference?

  • Thread starter Thread starter Anders Borum
  • Start date Start date
Make it 11-1!
I consider it a standard practice. I've had one or two languages where
the ! operator was not defined, and I always thought it was odd.

Yes.

I think we can say that the common practice is to use !.

Now
best placement of {
and
for(;;) versus while(true)
would probably be much harder to agree on.

Arne
 
Now
best placement of {

I always put { and } in pairs above one another. Putting it at the end
of the line saves one line in the file, but is less clear, IMO.
Personally, I don't indent the brackets, but I have seen it done so
that the brackets line up with the contents. Looked OK, but I just
don't do it. Unless it is the house style, of course, lol.
and
for(;;) versus while(true)

The latter is clearer, IMO. Also, it is "purer" in structured
programming terms, it describes a loop and actually has an "end
condition" rather than relying on the almost accidental way that the
for loop works.
would probably be much harder to agree on.

Indeed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top