Robert

23%
Flag icon
For example, our Java, JavaScript, and C++ style guides mandate use of the override annotation or keyword whenever a method overrides a superclass method.
Robert
This shouldn't be considered a matter of style. It's more a matter of safety. With the @Override annotation, the annotated method becomes erroneous if either the overriden or overriding method changes. Meanwhile, the style aspect of this rule contradicts another one of Google's Java style: not prefixing names indicating their type (e.g., "m" for member field: https://google.github.io/styleguide/javaguide.html#s5.1-identifier-names). Because why put into code what we should expect an IDE to indicate for us (syntax highlighting, icons in margin, etc.).
Software Engineering at Google: Lessons Learned from Programming Over Time
Rate this book
Clear rating
Open Preview