rutie icon indicating copy to clipboard operation
rutie copied to clipboard

Better naming convention for wrappable structs

Open abinoam opened this issue 4 years ago • 2 comments

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 avatar Jul 20 '20 01:07 abinoam

@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.

danielpclark avatar Feb 18 '21 19:02 danielpclark

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.

abinoam avatar Feb 19 '21 01:02 abinoam