[Gambas-user] usage of too much GOTO can be bad pracitce ?

PICCORO McKAY Lenz mckaygerhard at ...626...
Sun Jun 25 15:15:02 CEST 2017


niger, please when edited the Subject mantain the original suject..

if users want to automatically response in conversatin any mail from
gambas, please disable digest mode and use dary mode..

each mail will coming separatelly this its very usefully for gmail like
inbos where each mail are in-conversation mode...

for separing mails use labels..

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2017-06-25 8:43 GMT-04:00 Nigel Verity <nigelverity at ...67...>:

> I don't believe the use of GOTO is bad practice in terms of the efficiency
> and performance of the program, but its convenience often leads to lazy
> "spaghetti" code design which, in turn, usually leads to bugs.
>
>
> The use of RETURN is a much tidier way of breaking out of a SUB or
> FUNCTION, which has the effect of "GOTO END OF SUB/FUNCTION". It will then
> take you to the next line in the SUB/FUNCTION which made the call.
>
>
> It is always possible to write and position IF, SWITCH statements or loops
> in a way to avoid the need for a GOTO statement. The code following the
> corresponding label could, for example, be contained in a separate SUB or
> FUNCTION, which makes the code tidier and makes it easily reusable within
> the program.
>
>
> I certainly would not say that programmer who uses lots of GOTO statements
> is a bad programmer (as long as the program works correctly and
> efficiently) but I believe that few developers would choose to maintain
> code written by somebody else containing lots of GOTO statements.
>
>
> It's important to stress that this principle is not unique to Gambas.
> Nearly all programming languages support the concept of the "GOTO" (even
> C), and VB actively encourages it in its error handling, which is why
> Gambas is so superior.
>
>
> Nige
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list