Code Generation from the AST in Go

  • This is super cool work from Ian here.

    Go is quickly engendering a renaissance in command line programs and other services that run in hostile environments. I talked about this in my GopherCon 2014 talk: if you want to build quality code and deploy it into hostile environments, you need good crash reporting. The conversion rate from crash -> crash report is abysmal without automation, and it's critical to close your quality feedback loop.

    Crash-reporting is hard. Cross platform crash-reporting is harder. Cross-platform crash-reporting for unsafe languages is harderer. Terrifyingly so:

    https://code.google.com/p/google-breakpad/wiki/ClientDesign#...

    Making this so easy that it's just an extra step in your build process is a huge step forward. That it can work even on dependency code is hugely important.

    That's not to say it's without its tradefoffs, but I think this approach has the best ratio of value to effort.

    I'm looking forward to experimenting with this in deployed code to help me catch bugs in the wild.

  • "Go as a language is very opinionated... Go engineers are an anti-magic crowd."

    Great so far. But why does this always end up as....

    "This tool... auto-generates the code for you"

  • http://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule

    Writing code generators, inventing the wheel over and over again.

  • Code generation in Go is so fantastic. I made this in one late evening: https://github.com/bouk/go-faster

  • > Maybe like me you use Fresh

    > and you have a OCD of hitting save every 2-3 seconds as you are thinking

    Please stop with this "OCD" bullshit.

  • It's kind of telling that they feel that they first need to tell Go developers what an AST is ... PHP redux?