[Gambas-user] usage of too much GOTO can be bad pracitce or make influence in the code?
PICCORO McKAY Lenz
mckaygerhard at ...626...
Mon Jun 26 00:04:14 CEST 2017
2017-06-25 12:13 GMT-04:30 Tobias Boege <taboege at ...626...>:
> PICCORO, read this mail at your own risk. I won't accept invoices for
> wasting your professional time.
>
you forgive it the EULA M$ license ;-)
Oh wow, that's a high footstool you're sitting on.
>
well its due there's only one source of A&Q for gambas, a mail list.. and
if you dont have property configured the mail.. you never see the response..
"GOTO considered harmful" essays out there. Supposing you asked a general
> question about good practices regarding GOTO (which you were, just look
> at your opening message!) they also said that it was up to personal
> preference in the end. Therefore I don't see the too many inconsistencies
> you speak of.
>
yeah i'm very frustrating make programs and dont have a spanish good source
for..
> The only one who said anything about performance, which you bring up above,
> was nando:
>
> > Sometimes GOTO is needed...especially if you want your code to run
> faster.
>
> and here I agree with you. The last part is certainly debatable and depends
> on the platform (using goto in C is wildly different from using GOTO in
> Gambas, see below). *The* standard example, and *perhaps* what he thought
> of, is jumping out of 4 nested loops without GOTO. You can do it but at
> least the obvious two solutions introduce new functions (i.e. calls and
> returns) or some more IFs, both of which are forms of jumps.
as i spected i cannot show the resulting code now, due companies behavour..
but in my particular case i must ask firts.. and finally i doit by
myselft..
but i paste the result for others like me (know are very few,... but make
great things)
an the next part of your mail are great, thanks for clarify: i reading the
source code for analising but again i must spent more time.. i want made
some projects but the time its the firts enemy for those that have some
little vision...
> > i case of gambas analizing the code seems are not the same.. due gambas
> fist make their own bycode that runtime inderstand and then that runtime
> > pass to object mahine.. so many things change and its not the same... in
> > easy words..
> >
>
> Exactly, so why do you think your concerns about pipelining and branch
> prediction at the C -> machine level are relevant at all in Gambas?
> The program execution loop in the interpreter is a gigantic jump table.
> The execution of every instruction in a Gambas program involves at
> least two goto's in C, while the actual Gambas GOTO instruction is
> implemented as an arithmetic operation on the program counter!
>
> And no, I'm not conjecturing this; it's right there in the source code.
> It should be natural that you read it if you require a deeper understanding
> for your professional tasks than what others can provide. Your time is
> not more precious than anyone else's on this list.
>
eacho one in this list are always by own.. i can see that people here when
gambas releaseing only send bug reports of their used things.. does not try
other either by curiosity ...
> On a tangent I'm surprised nobody took the opportunity to scold Benoit
> in this thread yet :-) Have you never tried modifying one of his parsers,
> e.g. gb.markdown:
>
> $ cd ~/src/gambas3/comp/src/gb.markdown/.src
> // Count non-empty, non-comment lines
> $ egrep -cv "^[ ]*'|^[ ]*$" Markup.module
> 798
> // Count labels, GOTO and GOSUB lines which are not commented out
> $ egrep -i ":[ ]*$|GOTO|GOSUB" Markup.module | grep -cv "^[ ]*'"
> 75
> // Percentage of directly GOTO-related lines in the markdown parser
> $ pcalc 100*75/798
> 9.398496240601503 0x9 0y1001
>
interesting.. but as i tell you.. time its our enemy..
>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
> ------------------------------------------------------------
> ------------------
> 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