Quite agree. code generation will be especially helpful if it is not something trivial, and you need several rounds to make it perfect.
@hui zhang, If you need something generic, take a look at https://github.com/go-easygen/easygen, For e.g., here is how I generate the command line CLI handling: https://github.com/suntong/cascadia/blob/debf101d9ef70da9b3dd397fb73e70b6a31e5993/cascadiaMain.go#L7 On Friday, March 10, 2017 at 7:37:04 PM UTC-5, Michael Jones wrote: > > Nothing wrong with it, and nothing wrong with doing it for min and max > either. (Though it was a delight to see that animated editing sequence, so > for entertainment value that's the way!) > > I did code generation for my version of Sort and it is 3x-5x faster. It > takes intel more than 10 years to make a CPU that is 3-5x faster. Takes > just one programmer hour to perfect it with code generation. Nothing wrong > with that equation. > > Let them laugh all they want while you build for speed. > > Michael > > On Fri, Mar 10, 2017 at 4:27 PM, Tyler Compton <xav...@gmail.com > <javascript:>> wrote: > >> If we assume a more useful generic task than writing a min function, >> what's wrong with using code generation? >> >> On Fri, Mar 10, 2017 at 6:14 AM Henry <henry.ad...@gmail.com >> <javascript:>> wrote: >> >>> If you insist on generics-like code generation: >>> https://github.com/cheekybits/genny/blob/master/README.md >>> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fcheekybits%2Fgenny%2Fblob%2Fmaster%2FREADME.md&sa=D&sntz=1&usg=AFQjCNGSJLsd4YWusBjfCYCEHQs4zFzrfA> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "golang-nuts" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to golang-nuts...@googlegroups.com <javascript:>. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Michael T. Jones > michae...@gmail.com <javascript:> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.