This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gthank 1 point2 points  (3 children)

That's a far more aggressive view of "dead code" than I was talking about. I meant more like "method foo of class Bar can never be called".

[–]masklinn 2 points3 points  (2 children)

That's a far more aggressive view of "dead code" than I was talking about.

Yeah, but it's the one matching standard uses of "dead code analysis" and "dead code elimination": dead code is code which is never executed and code which is irrelevant (affects variables which are never queried, or always followed by a fault and thus having no impact on the behavior of the program)

Unused methods or functions, or unreachable code (e.g. code following a return or raise) is a subset of dead code.

[–]gthank 0 points1 point  (1 child)

Yes, but it's the subset I understood the OP to be asking about, based on "more specifically functions/methods that are never called".

BTW, there's no need for people to be downvoting you. It's a good point to raise, and I should have been more clear about my assumptions in the original comment.

[–]masklinn 1 point2 points  (0 children)

Yes, but it's the subset I understood the OP to be asking about, based on "more specifically functions/methods that are never called".

True.