Yet another code convention debate

  • Thread starter Michael Haufe (\TNO\)
  • Start date
M

Michael Haufe (\TNO\)

I'm glad to see other people objecting to illfounded dogmatic code
conventions.

Besides the arguments I've given on the board, there seems to only be
contention on indentation style...
 
T

The Natural Philosopher

Michael said:
Besides the arguments I've given on the board, there seems to only be
contention on indentation style...

well I spotted 'dobnt use continue: It oobsures the logic of the flow'

To me, the point of using continue, is to make the logic of the flow
less obscure.


if (!relevant) continue

...
...
...


or

if (relevant)

{..
...
...
...
...
...
...
..}


The later necessitates a further level of indentation, and on smaller
screens, that's a bitch. It also carries a bigger chance of a mismatched
braces....

It is also, at straight assembler translation level, slightly less
efficient.

Being a conditional jump to the loop end, followed by a jump to the loop
start, whereas the if..continue statement is a conditional jump to the
loop start.


I guess I am showing my age there though: These things mattered in real
time code with primitive compilers cramming firmware into ROMS..and
chasing cycles in interrupt service routines.
 

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

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top