GoF and Haiku

I just picked up a copy of Design Patterns by Gang of Four. I’ve noticed a lot of the pattern names or aliases are used throughout the Haiku API and discussions of the code. I’m assuming this is a fairly straightforward translation between the Haiku codebase and the book. Is this a safe assumption?

Often, but not always. For example “decorators” in Haiku are the thing drawing window decorations. This has nothing to do with the “decorator” design pattern. I think other cases should match reasonably well? Let us know what you discover :slight_smile:

1 Like

I’ll have to dig deeper into the code. But decorator was one of the first examples in the book. And their prime example for decorator pattern was drawing window decorations. Perhaps it isnt quite the pattern used in Haiku.