15,887,676 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by EFEaglehouse (Top 8 by date)
EFEaglehouse
7-Apr-11 10:05am
View
Deleted
Clearly we have difference experiences - and debuggers. One of my programming guidelines is to keep function length down to a single page in my editor, about 40 lines of code. I don't find it difficult to pick out one or two returns in that space. While my opinion is that judicious use of gotos or multiple returns is acceptable, neither are constructs that are prevalent in my code, and I comment heavily, so it doesn't present a problem for me. Obviously, your opinion differs. That's OK, too. Your shop, your rules.
EFEaglehouse
5-Apr-11 10:32am
View
Deleted
Never say never. Sometimes the clearest code is the shortest path through it.
EFEaglehouse
5-Apr-11 10:29am
View
Deleted
It's a tired cliche that mere use of a goto makes your code unreadable. It's my use of goto that improves my code's readability, instead of cluttering it with unnecessary if conditions and wasteful exception classes and overly complicated looping structures. Readability is paramount to me, so I apply the most practical tool, that is sometimes a goto.
EFEaglehouse
5-Apr-11 10:21am
View
Deleted
Fine if you have no cleanup.
EFEaglehouse
5-Apr-11 10:20am
View
Deleted
Reason for my vote of 3
This is fine if you have no cleanup to do. Otherwise, this applies to a different situation than the original article.
EFEaglehouse
5-Apr-11 10:06am
View
Deleted
Reason for my vote of 5
This is a very good alternate to using goto. It allows the code to be readable, yet gives a single exit point to the function. I have an aversion to do...while loops, but this is excellent for those who have an aversion to goto. Since C and C++ do not allow exiting a block, this or goto are the next best things.
For those who are mindlessly parroting their academic conditioning by saying all code that uses a goto is bad, you need to rethink your programming objective. Is it to produce readable and well-performing code or to create unnecessary complexity to avoid a very useful language feature - that is, do you want your code to be real-world practical or theoretically ideal? The answer is: it's your choice.
EFEaglehouse
5-Apr-11 10:03am
View
Deleted
Reason for my vote of 3
This is good, too, but has the disadvantage of multiple exit points and separates the cleanup function from what it is cleaning up. Serviceable for functions that are not very complicated.
EFEaglehouse
5-Apr-11 10:00am
View
Deleted
Reason for my vote of 4
For simple code, this would work well. But this doesn't fit my typical coding style. Why set a flag to a condition and have a separate test when you can just test the condition directly and execute a goto. As a practical matter, this boils down to personal preference.
Show More