My question is: Why repeat the error exit code again and again? If used
wisely, using goto statements can reduce the in a function by a few bytes
and reduce the number of points of change. Intead of having to look for all
the error code scattered in a function, the error code is in one spot where
you don't have to change sevel lines of code scadered throughout a fuction
just to change the exiting behavior.
"Crashfourit"
On 9/28/05, Richard Campbell <eek2121(a)comcast.net> wrote:
Hate to throw my 2 cents in, but why use macros or goto statements at
all? None of the demonstrated code actually needs a goto statement to
work. Granted i've not seen the actual offensive code , but all
examples here can be written without goto statements or macros. Why
bother using either? At any rate, i'm inclined to agree that macros are
a bad idea. Hiding a mess behind a preprocessor is considered bad
coding practice.
Richard
Gunnar Dalsnes wrote:
Yes, but
how is this different from someone not
knowing/understanding that a finally block is called when returning
from a try block?
That's a compiler language feature. That's like saying that learning
some 3rd party macro is equivalent to what operator new does in C++.
The new operator is just a word as anything else. Just because its a
compiler feature doesnt make it "magic". It just means that every C++
compiler should reserve and support it just like we can say ReactOS
reserve and support Xxx for usage Xxx. And you can overload new u
know. Then you never know what it _really_ does;-P
> I also learnt and remember English.
But I chose not to learn
Zimbabwean.
It this context it would be "Zimbabwean sound so weird I refuse to
learn it. Zimbabwean is flawed and ppl should stop speaking it. They
should learn English instead so I can understand them."
> instead of having the cleanup code
quadriplicated.
At least we agree on something.
So then Im free to apply that schema thruout ros? Or will I then get:
"gotos sux", "please dont do this", "it looks so ugly",
"i refuse to
do it this way" etc?
> That's really a flawed statement. Learning and using these macros
> won't change their inner deficiencies as being flow control macros.
They are just as deficient as the goto example you showed ei.
equivalent.
Learning and using them will just propagate a
frowned-upon
programming practice.
Just because someone else says you should do so doesnt make it right.
Thinking for urself (open mind) and not caring about what others says
("the standard") can be a relief.
Your argument is much like saying "I'm
sure if you all used
uninitialized variables you'll like them".
It depends. In Java they would;-P
>
G.
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.com
http://reactos.com:8080/mailman/listinfo/ros-dev
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.com
http://reactos.com:8080/mailman/listinfo/ros-dev