Re: [OFFTOPIC] CompSci class question
- Posted by simulat <simulat at INTERGATE.CA> Nov 14, 2000
- 414 views
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 >