
Next generation code generator for go - awalterschulze
https://github.com/awalterschulze/goderive
======
awalterschulze
I created gogoprotobuf, but I wanted to create a new code generator for go
that does not only work for protocol buffers, but for all go types.

goderive parses your go code for functions which are not implemented and then
generates these functions for you by deriving their implementations from the
parameter types.

These functions includes: \- recursive functions like GoString and CopyTo \-
functions for sets like Contains and Union and \- functions from functional
programming like Filter, Fmap and Compose (monad) \- concurrent functions like
applicative Do (from haxl)

Use cases: \- More maintainable code \- Experience or experiment with what it
would be like to use generic functions in Go ... today. \- Create user stories
for Go 2 in favour of or against generics. \- Don't argue about using labels
and gotos, instead of just writing a contains function. \- Do functional
programming in go. Well only partly because mutability is still a thing. \-
Less typing of: `if err != nil return err`. The compose function implements
monadic error handling. \- less error prone concurrency.

Ready for production and experimentation.

