clipperhouse / typewriter

The package underlying gen: type-driven code generation for Go
http://clipperhouse.github.io/gen/typewriters/#
Other
52 stars 20 forks source link

Splitting the project #2

Closed dfilipovic39 closed 9 years ago

dfilipovic39 commented 9 years ago

Hi, first of all typewriter is a great idea and nice job realizing that idea. Was wondering would it be possible to split the project up so the annotation parsing is separated from typewriter. I have a feeling that it could be more generalized. For instance for scaffolding a web project. Lets say you annotate a model and call an external app to scaffold repository for the model. Or write your view model and scaffold a controller. Possibilities are great, especially with code that has a lot boilerplate.

Does it make any sense? I looked into current implementation and its more oriented on fluent linq-like api and it would be hard to use in scenarios suggested (or am I wrong? :))

clipperhouse commented 9 years ago

The idea is to make the parser a separate package? We could do that but I don’t see it as very interesting. The current implementation is fairly tightly coupled to the (e.g.) the Tag and Type types. It could be decoupled, but it doesn’t buy much for the needs of gen. Feel free to fork it, though.