overview Link to heading
go is a compiled lang Link to heading
although go is a compiled language, it still has a lot of good features of interpreted language, like Garbage Collections.
class of go - structs
Link to heading
unlike structs in C which is a combination of variables, structs in go is a combination of variables and methods.
go, no inheritance, no generics, no constructor Link to heading
pkg, src, bin Link to heading
type var x int = 100 here int is the type.
Link to heading
short declaration x:=100 it
- first declares the type
- assign 100 to it
pointers Link to heading
&operator returns the address of a var/func*operator returns data at an address (dereferencing)new()returns a pointer to a var