3 ms·
I will note that one could design a pretty printer that reliably had better performance if the formatting style they chose was simpler and more amenable to it.
by munificent 10y ago
I will note that one could design a pretty printer that reliably had better performance if the formatting style they chose was simpler and more amenable to it.
My (mostly self-imposed) task was more difficult because I was trying to follow the existing style that humans were hand-applying to their Dart code, and that had a lot of tricky non-local cases that look nice but are hard to automate.
- korm 10y agoI have to say Dartfmt is one of my favorite things about using Dart. It works amazingly well and the fact that it's not configurable is a great decision [0]. I'm never afraid to peek into unfamiliar code because of that. So thank you. [0] https://github.com/dart-lang/dart_style/wiki/FAQ#why-cant-i-configure-it https://github.com/dart-lang/dart_style/wiki/FAQ#why-cant-i-...
- munificent 10y agoYou're welcome! That means a lot to me. I tried really really hard to make it produce output I and others would like. > I'm never afraid to peek into unfamiliar code because of that. This is exactly why dartfmt exists. It's not about making your code more readable to you, it's about making strangers' code more readable, because that lowers the bar to contribution between people in the ecosystem.