Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dual interface inclarity #50

Open
VictorEijkhout opened this issue Dec 7, 2022 · 0 comments
Open

Dual interface inclarity #50

VictorEijkhout opened this issue Dec 7, 2022 · 0 comments

Comments

@VictorEijkhout
Copy link

Page 153 "the public get_commander functions simple forward"

Have I mentioned how allergic I am to the word "simply" (or "just")? To me that's a signal that the writer is lazy, or even unclear on the topic themself. Since the latter is not the case, you reallyneed to waste more words on this.

First: do the work
So I thought I'd give the soldier a private: commander _c and let the work be return _c.

Hah. Your function is static and can not return non-static member. So why is your function static?

Then: undefined soldier::get_commander
Yes, I suspected that. What is the relation between your _impl function and the public functions?
I would love to understand and use this idiom, but your example is insufficient for that.

Please clarify. In fact, please do so right here and now because this issue unlike my others is not purely academic.

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

No branches or pull requests

1 participant