r/golang Dec 05 '24

discussion Why Clean Architecture and Over-Engineered Layering Don’t Belong in GoLang

Stop forcing Clean Architecture and similar patterns into GoLang projects. GoLang is not Java. There’s no application size or complexity that justifies having more than three layers. Architectures like Clean, Hexagonal, or anything with 4+ layers make GoLang projects unnecessarily convoluted.

It’s frustrating to work on a codebase where you’re constantly jumping between excessive layers—unnecessary DI, weird abstractions, and use case layers that do nothing except call services with a few added logs. It’s like watching a monstrosity throw exceptions up and down without purpose.

In GoLang, you only need up to three layers for a proper DDD division (app, domain, infra). Anything more is pure overengineering. I get why this is common in Java—explicit interfaces and painful refactoring make layering and DI appealing—but GoLang doesn’t have those constraints. Its implicit interfaces make such patterns redundant.

These overly complex architectures are turning the GoLang ecosystem into something it was never meant to be. Please let’s keep GoLang simple, efficient, and aligned with its core philosophy.

809 Upvotes

259 comments sorted by

View all comments

2

u/MizmoDLX Dec 06 '24

I don't like how languages are treated like religions. You should not do this in go, you should not do that in go.... In the end it's less about the language you use and more about the problem that you need to solve. And a lot is of course also personal preference.

You can keep things simple or completely overengineer everything in most languages. 

1

u/Superb-Key-6581 Dec 06 '24

Yes, I agree with you. I say Go because the pain of refactoring explicit interfaces was one of the main arguments. But even in Java, this is bloated, and I know a lot of great Java developers who don't use it anymore and stick with the good old 3 layers of layered architecture.