You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
О! It's goto again! I love it! You can do without it. You always can, but you don't have to.
In some cases goto simplifies code and speeds it up. I read an article somewhere that drivers are written with it to speed up transitions.
Hello there.
Assembler code doesn't know any other way.
To simplify code is unlikely, to make it unreadable for others is certain, about speed - it depends on what tasks, and who has what "handwriting when programming", in principle, I do not even want to discuss, it seems that we discussed seriously about benefits and harms of goto http://www.gamedev.ru/flame/forum/?id=69459.
If you get down to the level of program disassembling, loops in all JVS will most likely be organized as conditional jcxz transitions and so on..,
which will essentially be a construct if(cx==0) goto label
For early exit from nested loops, to jump from different conditions to a single point? This simplifies the code. I use it quite often. I use it for loops sometimes.
Hello there.
Assembler code doesn't know any other way.
If that's the way it is, then that's the way it is :), as the saying goes: "all felt-tip colours are different!" ))))))))
The matter is individual, you see, the main developer is bothered by OOP. If he didn't use OOP, he would have been furrowing the MQL5 Grand Theatre a long time ago.
http://khpi-iip.mipk.kharkiv.edu/library/extent/dijkstra/pp/ewd215.html
За многие годы я утвердился во мнении о том, что квалификация программистов - функция, обратно зависящая от частоты появления операторов go to в их программах.
...we should do ... everything we can to bridge the conceptual gap between a static programme and a dynamic process, to make the correspondence between the programme (unfolding in the space of the text) and the process (unfolding in time) as obvious as possible.
http://khpi-iip.mipk.kharkiv.edu/library/extent/dijkstra/pp/ewd215.html
This is just one of many opinions. There are just as many for and against. It's a matter of taste and style.
The author is limiting himself greatly.
This is just one of many opinions. There are as many for as there are against. It's a matter of taste and style.
The author is limiting himself greatly.
Modern trends in programming are such that programs are often written and accompanied by teams of programmers. This imposes requirements on the quality of the code, its readability.
My opinion: the code must be clear and well commented. Again my personal opinion: go to is a harmful operator, it prevents you from reading the code. Imagine a program of at least 500 lines, with a hundred labels and jumps to them.
The question of goto application is in the area of personal preference. He doesn't like it and comes up with a reason why he doesn't like it.
There are others who like it and come up with a reason why they like it. For me, all these reasons are the same. My code is simplified when goto is applied, then I use it, if not, I don't use it.
I don't limit myself to other people's speculation.
Imagine a program of at least 500 lines, with a hundred labels and transitions to them.
Drivers are still written that way. Why?
Because speed of execution comes first, second and third in drivers.
Why do we even need high-level languages when we can write everything in assembly language?
And why don't they put boomboxes and convertible seats in Formula One?