3 ms·
I love Go to bits, but I really don't like how so many tools revolve around codegen and boilerplate. Look at Kubernetes for example: you can't write an operator
by icy 5y ago
I love Go to bits, but I really don't like how so many tools revolve around codegen and boilerplate. Look at Kubernetes for example: you can't write an operator without generating a bunch of boilerplate.
- dagss 5y agoI think it's because metaprogramming/macros is a thing Go doesn't have that very many other languages have. Whether the Java/.NET way, the LISP way or the Python way -- most languages have ways of making DSLs and metaprogramming etc in more flexible ways than Go. I wish Go just got something like Lisp macros that could work compile-time only. Running macros at run-time isn't really the big deal, but generating code in the same language and context as the normal code is a big deal. Adding generics really doesn't help much here..
- pjmlp 5y agoThe irony is that Java and .NET already trailed that path 20 years ago.
- chazu 5y agoYou don't need any boilerplate to write an operator - you can write an operator in any language. I've written several in python and they all clock in under 300 sLoC