~/talk

Composition Over Inheritance

Talkat Gopherpalooza 2018 · on Friday, 2018-10-12· [go]
slides:none on file

Go favors composition over inheritance and demonstrates this by building a concrete gopher struct, an interface type with sayHello/get/fall methods, and composing behaviors via type embedding. The talk shows that Go has structs not classes, methods attach to types, exported names start uppercase, and there are no getters or setters enforced. Code examples compile and run, illustrating fewer brittle hierarchies and easier behavior reuse than classical inheritance.

AI-written summary · about

  1. 0:00Start
  2. 1:19Composition over Inheritance or the Composite Reuse Principle
  3. 1:47The Benefits of Composition over Inheritance
  4. 2:43User-Defined Types with Structs
  5. 4:38Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.