Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return 2 values from a function
Message
De
16/10/2008 09:30:42
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
16/10/2008 08:51:53
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01355203
Message ID:
01355347
Vues:
23
>I don't wish to get into a long drawn out argument here. My point is that from a coding standpoint, a method or function should have a single entry point, a single exit point, perform a single function and return a single result. c and the Windows API may not be great examples of programming practice as the current samples for Linq show it being mixed in the UI layer and not in the business or data layer where I think it should belong.
>
>I have no problem with a function returning a boolean value as its main parameter and returning a structure or a single out parameter; but, adding more out parameters or returns leads to code that is difficult to understand, a mess to maintain and is good with a nice Chianti and a marinara sauce.
>
>
>John

I don't wish to get into a long drawn out argument here either;)
"From a coding standpoint, a method or function should have a single entry point" - agreed,
"a single exit point" - highly debatable
" perform a single function and return a single result. " OK but returning a single result doesn't mean you can't return multiple values. An object is a single variable but it can have virtually endless number of properties as 'values'.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform