~/talk

From OOP to Go

Talkat Voxxed Days Athens 2022 · 2022-09-30..10-01· [go]
slides:none on file

Walks through translating a Java logger to Go, shows the bug caused by embedded structs promoting methods but delegating to the inner logger so context is lost, and proves inheritance-style translation fails; replaces ad-hoc targets with an interface-based design using io.Writer, swaps a custom LoggingTarget for standard library types and demonstrates that 351 types already implement io.Writer, and builds a simple injectable Logger struct with a constructor that writes to STDOUT or files.

AI-written summary · about

  1. 0:00Introduction and background
  2. 1:30Go basics and mindset shift
  3. 3:38Logging library in Java
  4. 4:41Structs and methods in Go
  5. 7:31Logger implementation in Go
  6. 8:33Extending logger with inheritance
  7. 9:36Embedded structs in Go
  8. 11:23Debugging embedded struct issues
  9. 13:30Why translation fails in Go
  10. 15:36Interfaces and design principles
  11. 17:21Solving redundancy with interfaces
  12. 19:27Logging target interface solution
  13. 21:33Using io.writer for logging
  14. 23:00Multiple logging targets
  15. 24:24Key mindset changes for Go
  16. 25:26Go is not OOP
  17. 25:48Next steps and conclusion
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.