top | item 40194097

(no title)

interlocutor | 1 year ago

In go you mix state with logic (example below), which apparently is a "major catastrophe" according to some on this thread.

   type Engine struct {
       HorsePower int
   }

   func (e Engine) Start() {
       fmt.Println("Engine is starting with", e.HorsePower, "horsepower.")
   }

discuss

order

No comments yet.