News for hackers. Stuff that matters.
Re:Software Design Principles I Learned the Hard Way by interlocutor on Sunday April 28, 2024 @11:20PM (#40194097)
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.")
   }

There are no comments on this comment yet.