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

You mean have the compiler modify the source code files destructively? Then I'll have to disagree, that just doesn't make sense.


There was a precedent in Haskell land: https://twitter.com/bos31337/status/116372971509121025

A more modern implementation: https://github.com/munificent/vigil


`gofmt -w` also already exists, it just (a) has to be run as a separate step and (b) doesn't have full cross-file understanding of the program.

Since we have version control now, I don't see any threat from an optional capacity for the compiler to destructively mutate the source as an optional feature. Let the same toolchain that converts input to output suggest improvements to the input.




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: