Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return 2 values from a function
Message
 
 
To
22/10/2008 02:12:49
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01355203
Message ID:
01356237
Views:
32
>>Throughout my college been told that every function should have only one exit point and thats how I had to draw my logical schemas( fortran and pascal yeah!) but I have always favored early exit since it made the program easier to read.
>
>Exactly what I am saying. Colleges, books etc say 'one exit point'. OTOH real world developers' experience show that 'multiple exit point' is easier to read and maintain for some (if not many or all) developers.
>Cetin

FWIW I still try to stick to one exit point when possible. (And college was a couple of years ago! LOL). I have no problem with an early Return if there is some unacceptable condition, but apart from that I like one Return at the end. Not slavishly, just as a goal. It seems cleaner to me.
Previous
Reply
Map
View

Click here to load this message in the networking platform