Comment

Comment by interlocutor

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.")
   }

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton