Skip to content

Conversation

@coolreader18
Copy link
Member

No description provided.

} else if class.has_attr("__call__") {
let result = self.call_method(&callable, "__call__", args);
result
self.call_method(&callable, "__call__", args)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These patterns were actually more debugger-friendly than now.
Do we prefer cleaner code than debugger friendly code?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, like being able to see the value of result there? I'm not sure, I don't use traditional debuggers that let you step through, but I'd think that there might be some way to see the value of an expression after it executes? I'm not sure.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly that use case. I just know this kind of "single expression for one line" or "single side effect for one line" is a traditional recommendation for debugger-friendly code. Because I am not a heavy user of debuggers, probably there must be experts who know better about this problem.

@youknowone youknowone merged commit 9b3fa53 into master Apr 26, 2020
@youknowone youknowone deleted the coolreader18/clippy-fixes branch April 26, 2020 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants