Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does that cover all mentioned usecases though? They're discussing source generation in this thread, not even close to the same thing (for certain usecases)


Kind of, you can use the parsing package for that, alongside the //go:generate infrastructure.

Or you can use Go reflection package and generate the source code from it.

Of if wanting to do something like Assembly.Emit, generate the machine code directly with a little help from unsafe and syscall packages.

Depends pretty much on the actual use case.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: