Wednesday, May 28, 2014

Becoming a GoPHPer - Notes

My Notes From: Becoming a GoPHPer
Paddy Foran

* What is It?

Modern Magic C
The language was designed.
No Manifests -> Code should be self documenting
Nothing is automagic
Automate with tools -> Allow Tools to update your code for newer versions
Meant to Innovate Programming Practice
A Philosophy Driven Language rather than a Feature Driven Language.

* What is Wierd?

Go is compiled
Go is a system language, not a web language by design
Packages are the equivalient of Library/Namespaces
"main" is a special package.
It is the entry point.
Packages are imported from code repos
Go uses **structs** instead of Classes -> like JS
Structs can be combined.. that's odd.
Static Typing
Initialization is not assignment i := 0
Garbage Collected normall though.
Scope is pickier about shadowing, but can notify you on compile (modifying inside foreach loop)
Visibility is Lexicographic
    Capitalize first letter in variable makes it public (PublicVariable vs privateVariable)
Pass By Value, not Pass By Reference
You have to use &Pointers to get things to work like we are used to.

* What is Good?

go build -> Build
go test -> Automated Testing using Testing Library
go fmt -> Automated Code formatting
go get -> Fetches the dependancies
race detector, test coverage, profilers
runtime environment is the operating system (actually globally works?)
stdlib http server is production ready
Interfaces are "Duck Taping"
Concurrency: GoRoutines -> Threads
    go RunThisThingThreaded(x, y) // That's concurrent Kyle

* What is Hard?

Static Types
No Frameworks
No time waiting for Go to compile

* After Hours

Vendors -> No specific way to do it. Hopeful the community will make a decision.

No comments:

Post a Comment