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

Better naming convention for wrappable structs #123

Open
abinoam opened this issue Jul 20, 2020 · 2 comments
Open

Better naming convention for wrappable structs #123

abinoam opened this issue Jul 20, 2020 · 2 comments

Comments

@abinoam
Copy link
Contributor

abinoam commented Jul 20, 2020

I've missed better naming convention for each layer.
In my project I did:

wrappable_struct!(WrappableMatrix, MatrixWrapper, MATRIX_WRAPPER_INSTANCE);

class!(MatrixRs);

MatrisRs a Rutie struct with the same name as the Ruby class.
WrappableMatrix - Wrappable to convey that this struct is suitable to be wrapped by the macro
MatrixWrapper - Wrapper in symmetry with Wrappable
MATRIX_WRAPPER_INSTANCE - To help me understand / distinguish the roles of these 2 "wrapper" things (because at the examples they have the same name changing only the case and it was confusing to me).

What do you think about it? Can we change the lines in documentation to something like?

From:

wrappable_struct!(Server, ServerWrapper, SERVER_WRAPPER);
class!(RubyServer);

To:

wrappable_struct!(WrappableServer, ServerWrapper, SERVER_WRAPPER_INSTANCE);
class!(RubyServer);
@danielpclark
Copy link
Owner

@abinoam Yes, I believe your suggestion would be best. Sorry for not responding sooner. The time I had thought I would be off to help when you started helping was off by one week at the time and so we didn't get to focus on these things during the time I was available. I'm doing better about delving into this project from time to time now.

@abinoam
Copy link
Contributor Author

abinoam commented Feb 19, 2021

Thank you for your kind answer. I also lost focus because of pandemia related things. I'll see if I can get back to work on it.

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