This is a creation in Article, where the information may have evolved or changed.
In the Reprint blog, the features of Go are mentioned, and as a reference to write Java, you can also give yourself some programming style.
Interface implicit implementation (no "implement" declaration)
Using the object type appropriately, Jfinal does so. High efficiency.
Embedding (not promoted to Super Class)
Multi-aggregation, multi-combination, less inheritance
Method according to function declaration (no special location required)
Static method can be static, improve efficiency. There is also the ability to put static methods inside a tool class, without initializing this class, and calling directly. That's what Fastjson did. greatly improve efficiency.
Method is a function
Ditto
Interface only method (no data)
Interface does not declare data inside. The Java community has debated a lot of questions before, and go gives a reference answer.
method is matched by name (not type)
This amount uses the object premise.
No constructors and destructors
Instead of relying on constructors, consider writing init methods and Destory methods, manually fetching, freeing links and spaces, and improving efficiency.
Postincrement (such as ++i) is a state, not an expression
Use + + with caution
No Preincrement (i++) and predecrement
No + +
Assignment is not an expression
Prevent the 2 = = and = confuse
Definite assignment and Calculation order in function call (no "sequence point")
Multi-use parentheses. Improve Calculation Order readability
Memory is initialized with a value of 0.
Note the initialized value. See if the situation is to assign an initial value.
There is no "this" in the method
Ah, good stuff. A very important reminder!! I vaguely thought this was inappropriate when I was programming. Bring a lot of ambiguity and hidden trouble.
No templates
Java templates are too disgusting. Although inefficient, the reflection constructor is still used ...
No exception
Less use of abnormal processing, can predict the failure to write program control as far as possible.
Built-in string, slice, and map
Find a String,map tool to take advantage of the hand. If not, write one yourself, I choose Guava.
Array bounds checking
Notice the cross-border error. The number of values in the array must be judged before all direct array reads, never cross the boundary.