- Learning Functional Programming in Go
- Lex Sheehan
- 48字
- 2021-07-02 23:13:52
Type hierarchy UML
This is the type hierarchy UML that we might have created while designing the Decorator pattern back in the day that we used object-oriented languages:
![](https://epubservercos.yuewen.com/6176FA/19470400908922906/epubprivate/OEBPS/Images/Chapter_20.jpg?sign=1739353929-cjVqMbHlWxojZndLjoyeimEZmNaGaSfp-0-83fc9451ede141afc86ae768fdd2e29c)
This is the design work needed to represent the same Decorator pattern using Go:
![](https://epubservercos.yuewen.com/6176FA/19470400908922906/epubprivate/OEBPS/Images/Chapter_139.jpg?sign=1739353929-OT03ZV33Hr2clUuNr20Q6hWne8agO2LH-0-a3ba2ad40ace3186b7a0b6a7f7f2b532)
"Less is exponentially more"
- Rob Pike