Hi
Thank you for this great book. I've read V2 and just checked my comments against V3 and here they are. Some are just my opinion and perhaps too picky.
hope it helps.
Marcel
Go_in_Action_v3_MEAP
PDF
p6:
logging happens concurrently
> logging concurrently ist a great idea, but it has to be done right. waiting to be sure the disk or receiver of a log message get "fsynced" if crucial in error cases. I tried to log via goroutines in one of my first applications, and there was the error case, where the app near a log statement crashed and the "concurrent" logger was not able to write the debug log before the application terminated.
p8:
Go developers simply embed types to re-use functionality in a design pattern called Composition.
> loose coupling seems to be also a valid advantage
p8:
But rather than building a long inheritance structure
> to be fair, most JAVA frameworks and common JAVA use don't recommend long/deep inheritance
see also EffectiveJava =>
Item 18: Prefer interfaces to abstract classes
Item16 : Favor composition over inheritance
p9:
You're often required to think through a large inheritance chain before you're able to even start writing code
> which is not true for most modern libraries and frameworks, see above.
p11:
Hello World
> go fmt ?
p11:
Fire up a web browser and navigate to
http://play.golang.org We'll wait for you.
> does that sound not strange.
p11:
Click the RUN button and see what happens!
> the button is named: Run not RUN
p12:
Go ahead and change the greeting inside the fmt.Println() function and hit RUN again.
> the button is named: Run not RUN
p21:
They contain a unique value which is always an address.
> why are they unique
p22:
Pointer variables pointing to variables of the proper type
> why not using HEX formatting?
p40:
2.4 Uncommon Features Of Functions
> I found the method call on nil receiver "uncommon" too.
example:
http://play.golang.org/p/PLo3WP54zg
p40, p41, p42:
query := bson.M{"user": user"}
> this should be (I think):
query := bson.M{"user": user}
p50:
func main(){
> go fmt. space between main() and {
p55:
3.3 Init
> actually one can define multiple init() functions in the same package
see:
http://play.golang.org/p/FgsCzqkCrH
spec: Multiple such functions may be defined, even within a single source file; they execute in unspecified order.