3 ms·
> That means adding line breaks (or “splits” as the formatter calls them), and determining the best place to add those is famously hard. Naive question here: W
by Bromskloss 9y ago
> That means adding line breaks (or “splits” as the formatter calls them), and determining the best place to add those is famously hard.
Naive question here: What is so hard? It can be solved with dynamic programming, right? Doesn't he even link to solutions of the problem?
- perfmode 9y ago> For most of the time, the formatter did use dynamic programming and memoization. I felt like a wizard when I first figured out how to do it. It worked fairly well, but was a nightmare to debug.