Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
go [2019/08/23 10:43] – [Technical papers on Go] rpjday | go [2019/08/25 09:38] (current) – [Articles on Go] rpjday | ||
---|---|---|---|
Line 3: | Line 3: | ||
Stuff regarding Go programming language. | Stuff regarding Go programming language. | ||
- | ===== Figure out ===== | + | ===== Figure out/ |
+ | * proper brace placement to avoid semicolon insertion | ||
+ | * " | ||
* fmt.Printf() format specifiers | * fmt.Printf() format specifiers | ||
+ | * named return values (explicit or allow to default) | ||
+ | * type "zero values" | ||
+ | * "var p = & | ||
* how to list all package methods from the command line? | * how to list all package methods from the command line? | ||
* how multi-platform things like Sqrt() work? | * how multi-platform things like Sqrt() work? | ||
Line 11: | Line 16: | ||
* neat uses of " | * neat uses of " | ||
* deferred call args are evaluated immediately | * deferred call args are evaluated immediately | ||
+ | * modifying named return values | ||
+ | * package " | ||
+ | * closures | ||
+ | * methods | ||
===== Course outline ===== | ===== Course outline ===== | ||
Line 34: | Line 43: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// | ||
==== Technical papers on Go ==== | ==== Technical papers on Go ==== | ||
Line 40: | Line 50: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | |||
===== Internal wiki links ===== | ===== Internal wiki links ===== | ||
Line 47: | Line 58: | ||
* [[Golangbot tutorial]] | * [[Golangbot tutorial]] | ||
+ | ===== Language features ===== | ||
+ | |||
+ | ==== Methods ==== | ||
+ | |||
+ | * Go does not have classes; a method is a function with a special receiver argument (such as " | ||
+ | * Value receiver versus pointer receiver (one or the other, not both) | ||
+ | * Functions with a pointer argument must take a pointer, while methods with pointer receivers take either a value or a pointer as the receiver when they are called. | ||
+ | * Methods with value receivers take either a value or a pointer as the receiver when they are called. | ||