8000 Wishlist: Separate static and instance methods · Issue #36 · hdoc/hdoc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Wishlist: Separate static and instance methods #36

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

Open
danakj opened this issue Oct 28, 2022 · 3 comments
Open

Wishlist: Separate static and instance methods #36

danakj opened this issue Oct 28, 2022 · 3 comments

Comments

@danakj
Copy link
danakj commented Oct 28, 2022

Static methods disappear into the list of instance methods.

https://docs.hdoc.io/danakj/subspace/r3AD4D4163C31005F.html

It would also be really nice to separate constructors and operators out, and maybe even provide them in a more human-readable friendly way instead of just the C++ syntax.

@hdoc
Copy link
Owner
hdoc commented Oct 28, 2022

Thank you for the suggestion. This is should be an easy fix to make and we'll look to add it in the next release.

I'm intrigued by your suggestion to "provide them in a more human-readable friendly way". We agree that making docs human-friendly is critical. Do you have any examples of what you mean by this so that we can act on it?

@danakj
Copy link
Author
danakj commented Nov 2, 2022

Sure, my idea was that any type has certain properties which end up being defined by the presence of constructors (or the presence of other constructors - like how a move constructor means it doesn't copy unless that is specified too).

So instead of just listing the constructors for the reader to do all the compiler math, present a set of properties instead:

class FooBar
 - Can [be moved](link to move constructor)
 - Can [not be copied](link to deleted copy constructor, or to move constructor)
 - Can [be assigned by moving](link to move assignment operator)
 - Can [not be assigned by copying](link to deleted copy assignment, or to move assignment operator)

This sort of idea. The signatures are noisy and not so interesting, but the properties of the class are what readers would like to know, I believe.

@hdoc
Copy link
Owner
hdoc commented Nov 2, 2022

That is a fantastic suggestion, having hdoc do the "compiler math" as you so aptly described it is a great way for us to reduce the cognitive load on the reader. We'll add this to the roadmap.

The signatures are noisy and not so interesting, but the properties of the class are what readers would like to know, I believe.

Agreed.

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

2 participants
0