Re: [OFFTOPIC] CompSci class question

new topic     » goto parent     » topic index » view thread      » older message » newer message

Here's my 2 cents worth
Assuming that a break and continue is like a goto - I'd say it's really
handy sometimes, but a bad habit in general. It's not that jumps like that
are a bad way to get something done, it's that it's a bad way to think about
your problem. It tempts you to define what you're doing from the wrong
perspective.

Maybe using jumps is related to the problem of using flow charts. It makes
you think of the program as a bunch of parts that are assembled to make a
machine that does something. The advance with structural programming was to
start thinking of a program as a logical structure - more like a statement
than a machine. I think that probably "structured programming", with its
modularity leading all the way to OOP was found to be a far more powerful
way of writing code than the older languages. It did mean that you basically
had to forget about jumps though.
Bye
Martin
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu