[Qt-interest] [OT] Hiding a QDialog?

Kustaa Nyholm Kustaa.Nyholm at planmeca.com
Wed Jun 30 14:35:30 CEST 2010


> I consider "hidden" return statements in the middle of the code almost equally
> as bad as "goto"

Well, even goto has it's place ;-) but more seriously it really depends on
circumstance and the style adapted. A lot of logic can be most clearly
(IMO) expressed and implemented via early returns: a function returns
as soon as the answer is known. Also without goto some looping conditions
result in extorted code so break,continue and (early) return are valid ways
to express the design intent. It all depends.
br Kusti





More information about the Qt-interest-old mailing list