I have read this patch sent in several times and have realised that every time it contains a large number of "goto"'s.
I certainly do not like "goto" in structured code. My question to the forum is if it is allowed to use "goto" in wine or if you prefer not to use it.
Even when this will make the code larger but it may give a little nore readability,
luis.busquets@ilidium.com wrote:
I have read this patch sent in several times and have realised that every time it contains a large number of "goto"'s.
I certainly do not like "goto" in structured code. My question to the forum is if it is allowed to use "goto" in wine or if you prefer not to use it.
Wine takes the right (TM) approach to goto: the non ideological one: goto is fine for handling a lot and complex cleanups needed on error paths. You always need to balance the advantages and disadvantages of goto: does the goto make the code more readable and clear? If yes use the goto if not then don't. See also Donald Knuth paper "Structured Programming with Goto Statements" http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf
Even when this will make the code larger but it may give a little nore readability,
No, it doesn't increase readability it decreases readability a lot. Especially as you have to replace "goto error:" with deeply nested if/else code and that is not readable at all. Using goto right is an art; you need to look at the code and say that it looks good.
bye michael