-
Notifications
You must be signed in to change notification settings - Fork 127
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
Rename variables of rcl types #193
Conversation
be2153c
to
7741dfc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it the opposite, I like the uniformity that every wrapped rcl entity has the same field, rclpy
and rcljava
do that, for example. It's more confusing if every struct
has a different name for what is essentially the same (a pointer to the underlying native structure).
What I'd prefer is instead getting rid of the handle structs (like PublisherHandle
struct) and use rcl_publisher_t
as the value for the handle field directly.
I can (unfortunately) see it going both ways - to some people, it's probably easier to think about if the names are completely uniform (like what Esteve suggested). To other people, the explicit naming of the underlying type could be useful (which I think is what Nikolai is going for with this PR). Personally, like Nikolai, I like the explicit naming of the underlying type. However, since this is admittedly my first time writing a client library, my preferences may not be fully in-line with what more experienced developers of client libraries are comfortable with. On the other hand, how many developers of client libraries are going to start moving over to work on Perhaps we should bring this up at the next working group meeting, and get some community feedback? See which style is the most clear to the most people? Our ultimate goal should be readability to the maximum number of people, so as to encourage more participation in the creation/maintenance of the library. At least that's how I see it. |
@esteve I had a brief look into one file in |
@nnmm you're right, I recall using One thing, is that I'd like the |
@esteve Ok, then I'll implement |
@nnmm thanks! That change can be done in a separate PR if that's more convenient. |
Yes, let's do that. |
@nnmm do you want to merge this first or you'd rather wait for the PR removing the |
@esteve This one first (but after 186), since it's already open. |
7741dfc
to
63cc605
Compare
I find it confusing and not very descriptive that "handle" is used to refer to both any rcl binding struct, and the
PublisherHandle
etc. types.This PR changes the variable names of rcl binding types to be more descriptive, e.g. use
rcl_node
as the variable name for anrcl_node_t
. Afterwards, "handle" refers exclusively to thePublisherHandle
etc. types.What's maybe worth discussing: Is
rcl_node
also fine for a&mut rcl_node_t
?