Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Thundering Train Programming
Message
De
20/01/2006 07:58:01
 
 
À
20/01/2006 07:19:15
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01088463
Message ID:
01088842
Vues:
37
>>Arent' we taking this a little to the extreme? If I am the programmer, it is my responsibility to see that parameters are passed correctly between my functions. If I am counting on the user for input parameters, then I check them. I've seen programs were there were 20 lines of parameter checking on a simple function call. Its ridiculous and a waste of time and effort.
>
>If I create a function, I'm the programmer and anyone else (including other functions in the system) is the user. If my function does not crash and worse it even returns a value that is passed on to some other function, which also doesn't crash, when something finally does crash, how will one locate the source of the problem? One would do what I see so often; plug in a couple of lines of code at the location of the symptom (workaround) and go on as if the problem is solved.

As I read it, you too, like me, want the function to 'crash' if it gets wrong input. But why not let the general error and exception handler handle this? In many situations there is no real need to insert error/exception handling code in the routine. Perhaps even on the contrary, such code itself can be partially based on wrong assumptions and thus cause problems and even the problem you describe (no crash).
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform