by sharpercoder · 9y ago · 0 comments
Bob Nystrom (munificent) disagrees[0] after writing one himself:
> The search space we have to cover is exponentially large, and even ranking different solutions is a subtle problem.
[0]: http://journal.stuffwithstuff.com/2015/09/08/the-hardest-pro...
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.
[0] https://github.com/dart-lang/dart_style/wiki/FAQ#why-cant-i-...
> 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.
Also, describing how these building blocks interact using laws is really incredibly useful! For that, credit goes (I think) to Hughes [1].