Oddbean new post about | logout
 you know you can declare and assign a variable in one shot with := right?

the conventions on structuring at the top level of a source file are based on Modula/Oberon syntax, it's very fast to find all the sentinels and then process the sections in the compilation process

also, what do you mean type declarations? 

to do some of the things that are just a couple of type definitions and methods in Go requires a whole fancy and wordy object definition in most OOP languages

if you need something like inheritance you can do it with composition in Go - if you make a struct member just the name of a type (anonymous field) you can access its methods directly from the variable of the struct type, this is called composition 
 Yes, I like how Go does (or doesn't do) inheritance. Very clojure-like. By type declarations I just mean the map[string]int syntax. Not a deal breaker, but sort of silly. 
 why is it silly? how else are you going to indicate something that is later referred to as varname[key] ? 
 It's not conventional, most other languages do something like Map<string, int>. It's like MM/DD/YYYY time format. Idiosyncratic vs logical