-
Notifications
You must be signed in to change notification settings - Fork 192
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
Why must field names of messages and services be lowercase? #333
Comments
The original design article went in as part of #32 . There was no rationale given for that particular rule there. The wording of "must" in that article is in RFC2119 style, which is why it is very imperative. In short, we'd be OK with lifting this restriction. However, we do want to keep the core using only snake_case fields (for consistency), which we would want to do with a linter. Thus, in order to lift this restriction the following would need to be done:
We aren't likely to have time to do this, so if you'd like to contribute, we'd be happy to review PRs to do the above. |
I've always understood the main rationale for the no-capitals rule-of-thumb to be the fact it significantly reduces possibility for errors and makes 'guessing' the exact spelling of fieldnames much easier. My experience with other middlewares/code generation frameworks is that, despite the fact we have extensive code-completion support these days, no-capitals is very convenient. Personally, I believe it outweighs the fact fieldnames can't follow naming of things like mathematical expressions, but this is just one voice/data point of course. |
Some history about rationale can be found on the ROS next gen SIG. Multiple threads mention interface files but I guess this RFC sums some of it up:
https://groups.google.com/g/ros-sig-ng-ros/c/YAyfgrvUvs0/m/N0F5d1S5zqgJ |
Thanks for the historical notes @mikaelarguedas ! |
In the design draft, it says
Capital letters in field names can sometimes more suitable and human-readable especially when it comes to mathematical expressions, e.g. in FrankaState. Are there special reasons why capital letters must be eliminated from the field names?
The text was updated successfully, but these errors were encountered: