Could we remove syntax rewriting options from Dotty?

I actually think that we’d be throwing out a lot of potential if we do this. Arguably nothing should be able to provide as good of rewrites as the compiler seeing that the compiler simply knows the most about your code. We probably agree on this, but then it comes down to a maintenance / usage issue. I have no idea how many people are using the rewrite features of Dotty, but I do know that a ton of users are using scalafmt, which helps surface bugs and warts. Also scalafmt has a quite a bit of activity on the repo, often really quickly fixing the issues people report. Can the same be said about rewrite features?

One of the reasons I really hope the rewrites can be more rock solid and used is that I think we can also utilize them in other ways. For example in the discussion about actionable diagnostics the rewrite functionality is actually being re-used to create quickfixes that can be attached to the diagnostic. I hope to see a lot more of this in the future meaning that hopefully rewrites can get more focus, not less.

5 Likes