3 ms·
Heuristics? That sounds like a job for machine learning, and I'm not being frivolous. I think that it is doable, and when it gets it wrong, the consequences are
by tgv 5y ago
Heuristics? That sounds like a job for machine learning, and I'm not being frivolous. I think that it is doable, and when it gets it wrong, the consequences are almost nil. It would at least make a decent graduation project.
Let's not think of the spin-off: FaaS.
- iudqnolq 5y agoPart of the complexity is if I format my code and commit it, and then you checkout and make a change, we don't want your formatter to have different opinions on how to format my code. For this you need (partial) stability at least across minor versions, which is harder with a less-explainable algorithm.
- munificent 5y agoThere is research into using ML for automated formatting. Personally, I'm not a fan. The heuristics are relatively simple and when hand-authored can be explained. Throwing ML at it discards explainability and risks really weird formatting decisions on edge cases for relatively little upside. My experience is that people prefer formatting that is: 1. Unsurprising. 2. Nice looking. 3. Simple. In roughly that order. Using ML might increase 2 but at the expense of 1 and certainly 3.
- klyrs 5y agoWhy replace a domain-specific heuristic with domain-agnostic machine learning? And where do you get high quality training data?