I don't understand why goto's are so bad. I LOVE to use it in an if-else or switch to quit a loop. But everyone says they are bad and I should not use them but no one says why! Can you explain it to me?
sergent 52 Posting Pro
Recommended Answers
Jump to PostSoftware reasons:
- It reduces code readability.
- It produces inefficient code.
- It makes code maintenance harder
- ...probably many more.Hardware reasons:
- It is inefficient.
- Branch statement are one of the most inefficient operations, and using many of those makes the hardware work more, …
All 13 Replies
mrnutty 761 Senior Poster
sergent 52 Posting Pro
Bench 212 Posting Pro
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
invisal 381 Search and Destroy
Bench 212 Posting Pro
invisal 381 Search and Destroy
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Bench 212 Posting Pro
mrnutty 761 Senior Poster
arkoenig 340 Practically a Master Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
arkoenig 340 Practically a Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.