[untitled]1 points·by botirk·vor 9 Monaten·0 comments1 commentsPost comment[–]botirk·vor 9 MonatenreplyI hit this while building Adaptive, a proxy layer for LLM APIs.I needed to extend the OpenAI SDK / Anthropic SDK types with some extra fields.In most languages, this is trivial.In Go, it meant:→ Embedding the original struct and hoping it wouldn’t break with the next SDK release.→ Or recreating the types entirely, just to add fields.That feels painful for something so basic.But here’s the twist.I also love how Go won’t let me build endless inheritance hierarchies or clever “extension” tricks that make a codebase unreadable.The rigidity forces simplicity.The problem is sometimes it becomes too simple.When I want type-specific extensions, Go makes me fight the language instead of working with it.That’s why I both hate and love Go’s type system.It keeps my code clean — but makes it harder to grow.
I needed to extend the OpenAI SDK / Anthropic SDK types with some extra fields.
In most languages, this is trivial.
In Go, it meant:
→ Embedding the original struct and hoping it wouldn’t break with the next SDK release.
→ Or recreating the types entirely, just to add fields.
That feels painful for something so basic.
But here’s the twist.
I also love how Go won’t let me build endless inheritance hierarchies or clever “extension” tricks that make a codebase unreadable.
The rigidity forces simplicity.
The problem is sometimes it becomes too simple.
When I want type-specific extensions, Go makes me fight the language instead of working with it.
That’s why I both hate and love Go’s type system.
It keeps my code clean — but makes it harder to grow.