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

The language I use at work has one formatter with zero configurability. This is a good thing. It has had a long open issue on github: allow users to put an import statement anywhere in the source code (not in the middle of a function, but between functions) and have it move up to the import section at the top of the file. This is syntactically invalid if left unformatted; you can't have imports after the first definition. I'd talked to the program's creator and he said it was going to be a high effort change because the formatter is a fork of the compiler, and the compiler first considers imports before switching to considering function declarations.

I gave problem to Claude and went and did yard work. It handled it in one shot, including writing tests that I could understand and be satisfied that it works. The PR implementing this remains open and that's fine; it's a lot to ask a maintainers to take responsibility for code I don't fully understand. I don't want to lean on them! But now I use my modified version of the formatter, and I think some people at work do too. It's an amazing era for "give me this feature why not?"



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

Search: