rutie
rutie copied to clipboard
Better naming convention for wrappable structs
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);
@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.
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.