Hacker News new | ask | show | jobs
by 9rx 97 days ago
> this is where metaprogramming would have helped, right?

It is infinitely flexible for any kind of tool you can imagine, so it is quite likely that someone has created a tool to use in a place where metaprogramming could have been used instead. But I am not sure if it helps globally. The very directive in question, `//go:fix inline`, is a directive for a tool that refactors code — changing the files stored on disk to meet modern idioms. I don't think you would want to use metaprogramming for that, would you? It is not something you want to happen at compile time or run time. It is something you run only when you are ready to modernize your codebase (which, in some cases, might be never).

1 comments

Hmm... I believe nodejs ecosystem solves this by using separate, tool-specific config files.. though i hate it (having so many config files).