This is a creation in Article, where the information may have evolved or changed.
If you have the following features, go can make the programmer more efficient.
1. Automatic conversion of mathematical types. Now do an integer with the floating-point calculation also to manually turn the type. It is said to be for more secure and predictable code. But other mainstream languages support automatic turn, and everyone is used to it. Where type safety needs to be considered, the person who considers it will naturally consider it.
2. Support from polymorphism. Interface support for polymorphism is still relatively limited. Down casting can not do sometimes is not very convenient. The following code, for example, cannot be compiled.
Type Base struct { xxxx}type Derived struct { base}func main () { v1: = &drived{} var v2 *base v2 = V1//Compile but v2 = *base (v1)//Not also}
3. More convenient operation of the array such as contains (this very common thing is not really inconvenient), use the plus sign to connect the array (every time to write append is too modern), map (map and generator such things sometimes used to be too convenient), Sort (the sort library is still not easy to use) compared to Swift, the operator function is cool.
4. More container libraries, such as set,sortedset, etc.
5. Dynamic Link library. Just know this time is still a little surprised, to replace the C + + language, this thing does not support how possible? Wouldn't it be a lot of trouble to expand?
6. Support for better exception handling. Panic is still too troublesome, always want to knock repetitive code, fingers too tired.
7. Parameter table with name and default value of parameter. Why doesn't this good thing support Nikki?
8. Macros. Macros like __file__ and __function__ are useful. Some places use macro definitions to save a lot of code.
9. Method overloading. With 7 can be implemented together.
10. Class method. Prefixing the method name can also be simulated, but it's hard to see, isn't it?
11. Ternary operator. X?x:x. Don't understand why not support this ancient function, forget?
Cond...