6 ms·
In go you mix state with logic (example below), which apparently is a "major catastrophe" according to some on this thread. type Engine struct { Hors
by interlocutor 2y 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.")
}