Re: What do you think about the code?



Ian Collins wrote:
Frederick Gotham wrote:

<snipped>


In my own humble opinion, I think it's childish to outright ban something
when it comes to computer programming -- I feel it gives an air of
inconfidence in one's competence.

Well that's team democracy at work. We preferred well structured code
that was easy to refactor. Try extracting your inner loop to a function.


Do you program in a language other than C? Do you use exceptions
in those languages? Exceptions are just another form of gotos,
only its "goto that location and tell the code there that this
happened" and not just "goto the error location, it will
unconditionally execute code to handle errors". No one ever seemed
to have trouble refactoring code which generated excetpions.

Ban away all you want; exceptions got popular *because*
developers wanted a structured way to handle errors. Handling
errors is not part of the algorithm logic; I see a benefit in
moving the code that checks for and handles specific errors
outside the block that contains the logic. Others see this benefit
as well, hence the popularity of exceptions.

Did you ban setjmp/longjmp too?

goose,
not being rhetorical - I'd really like to know.

.



Relevant Pages