Don't force public variables to use Hungarian notation#8774
Open
Gold856 wants to merge 4 commits intowpilibsuite:2027from
Open
Don't force public variables to use Hungarian notation#8774Gold856 wants to merge 4 commits intowpilibsuite:2027from
Gold856 wants to merge 4 commits intowpilibsuite:2027from
Conversation
8345c2e to
4efa3c3
Compare
jlmcmchl
approved these changes
Apr 18, 2026
4efa3c3 to
557de6c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
People generally have expressed a dislike for the Hungarian notation used in member variables, especially in examples/templates. There are some benefits to Hungarian for private member variables (like knowing what's a member vs. local in a PR review) so we'll keep private member variables the same for now, but public variables and any variables accessed like struct fields should no longer use Hungarian notation, since it looks much worse. New PMD XPath rules have been added to accomplish this goal. Additionally, this also enables the
PublicMemberInNonPublicTypelint, as there's a lot of nested classes (especially in DriverStation) that have fields which are directly accessed, and those should not use Hungarian either, so this lint forces the fields to be "package private", which then will cause the new rules to apply.This also removes all Hungarian notation from the examples/templates to not force downstream users to use the same style as us and because people disliked it.