TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Code Generation from the AST in Go

83 pointsby bketelsenabout 10 years ago

6 comments

inconshreveableabout 10 years ago
This is super cool work from Ian here.<p>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 -&gt; crash report is abysmal without automation, and it&#x27;s critical to close your quality feedback loop.<p>Crash-reporting is hard. Cross platform crash-reporting is harder. Cross-platform crash-reporting for unsafe languages is harderer. Terrifyingly so:<p><a href="https://code.google.com/p/google-breakpad/wiki/ClientDesign#Exception_Basics" rel="nofollow">https:&#x2F;&#x2F;code.google.com&#x2F;p&#x2F;google-breakpad&#x2F;wiki&#x2F;ClientDesign#...</a><p>Making this so easy that it&#x27;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.<p>That&#x27;s not to say it&#x27;s without its tradefoffs, but I think this approach has the best ratio of value to effort.<p>I&#x27;m looking forward to experimenting with this in deployed code to help me catch bugs in the wild.
tomblomfieldabout 10 years ago
&quot;Go as a language is very opinionated... Go engineers are an anti-magic crowd.&quot;<p>Great so far. But why does this always end up as....<p>&quot;This tool... auto-generates the code for you&quot;
评论 #9275487 未加载
评论 #9275459 未加载
froh42about 10 years ago
<a href="http://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Greenspun%27s_tenth_rule</a><p>Writing code generators, inventing the wheel over and over again.
boukabout 10 years ago
Code generation in Go is so fantastic. I made this in one late evening: <a href="https://github.com/bouk/go-faster" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bouk&#x2F;go-faster</a>
Dewieabout 10 years ago
&gt; Maybe like me you use Fresh<p>&gt; and you have a OCD of hitting save every 2-3 seconds as you are thinking<p>Please stop with this &quot;OCD&quot; bullshit.
frowaway001about 10 years ago
It&#x27;s kind of telling that they feel that they first need to tell Go developers what an AST is ... PHP redux?