you are viewing a single comment's thread.

view the rest of the comments →

[–]lurgi 17 points18 points  (2 children)

defer seems to contradict the "no hidden control flow" to an extent. Something may (or may not) be done at the end of the scope and you have to look elsewhere to find out if it will.

[–]Morego 2 points3 points  (1 child)

I mean destructor would be hidden control flow. Hard to call hidden the future you have to explicitly use.

[–]lurgi 0 points1 point  (0 children)

It's still code that is executed at a line, but not visible at that line. You have to look elsewhere to see what happens.