3 ms·
> Are there Rails-like frameworks for Go? Why I try to Google that, I find lots of stories about people switching from Rails to Go, but not a lot of frameworks
by aikah 10y ago
> Are there Rails-like frameworks for Go? Why I try to Google that, I find lots of stories about people switching from Rails to Go, but not a lot of frameworks discussions.
The definitive answer is no. It's no because given Go's type system it is impossible to create a framework like Rails while staying type safe. One could create something that involves a lot of reflection tricks but you'd loose type safety. The alternative would be code generation + DSL but why use Go at first place if you end up relying on a complex DSL that needs to be compiled to Go first ? it doesn't make sense.
The best you'll get with Go are Sinatra or Flask clones. But Rails? no way.
If you want the Rails experience use Rails. Go is more verbose and more rigid than Ruby anyway.