emyrk
Joined 5 years ago
Joined 5 years ago
The theory when we came out with guts was that Golang's typing system is very simple (this was before generics when it was made). So how hard could it be to write a simple converter?
The first iteration of guts was written in an afternoon. Eventually I moved it to its own repo, mainly for personal use.
So honestly it really comes down to making it as easy as possible to write backend code. Using another spec that autogen's the Golang would be an extra step we did not feel we needed.
This project admittedly was developed to solve a specific need in an existing codebase with a lot existing types.
The codebase is also mostly maintain by the backend Golang engineers. Letting them use their native type system increases adoption and buy in.
The reason to keep Golang as the source of truth is these types originate from the backend. So when you are writing the backend, it is just the easiest place to write and maintain things. No obstacles.
Golang types are also very simple. I imagine almost all Go types can be converted because of that.