Repository navigation
Update policy around language constructs - #685
Conversation
FridaTveit
left a comment
There was a problem hiding this comment.
Looks great, thanks @stkent :) I have one small question, but I'm happy for it to be merged :)
|
|
||
| > Starter implementations and test classes should not include the `final` keyword in class declarations as it isn't strictly necessary and could be confusing to people unfamiliar with Java. | ||
| > Minimize (within reason) the number of Java language constructs a user is exposed to simultaneously at the beginning of the track. Instead, introduce those constructs with examples and hints in an appropriate later exercise. Specific applications of this policy include: | ||
| > - avoiding use of the `public` keyword in user-facing class declarations, method signatures, and parameter signatures; |
There was a problem hiding this comment.
In my opinion we're leaving out public not just because of minimising complexity (especially since public is more familiar to most people and therefore adds less complexity than final) but also because it's best practice to limit access to classes, methods and variables where possible. So if something can be made package private or private, then it should be. Do you agree? Is this worth mentioning here?
There was a problem hiding this comment.
Good point; I think that's worth calling out in a separate policy entry (that we aim to follow best practices); the minimization of visibility would then be an instance of that policy. If you concur, I'll make the change later today.
|
Pushed with proposed changes; let me know what you think! Writing this is hard :P |
08cfa48 to
8f9ad75
Compare
| ### Adhere to best practices | ||
|
|
||
| > Ensure that all Java code adheres to the best practices listed below: | ||
| > - minimize the accessibility of classes and members (Effective Java, item 13) |
There was a problem hiding this comment.
Perhaps a link to an explanation of this would be nice.
There was a problem hiding this comment.
Unfortunately there's no way to link to content of the book itself, as far as I know. I could link to some kind of proxy like http://jtechies.blogspot.com/2012/07/item-13-minimize-accessibility-of.html?
|
Updated and rebased! |
Smarticles101
left a comment
There was a problem hiding this comment.
I think it looks good now :)
|
👍 thanks for the eyes, @Smarticles101! |
@Smarticles101 @FridaTveit please check!
Reviewer Resources:
Track Policies