3 ms·
I really hope the author did some research. There is a very old work from Derek Oppen that has been adapted to the functional world later. The principles sound
by choeger 8y ago
I really hope the author did some research. There is a very old work from Derek Oppen that has been adapted to the functional world later. The principles sound very similar to the OP's approach. It would be a shame if so much work went into reinventing the wheel...
- baby 8y agoI read once that this is the difference between research and hacking. Research is about researching related work and the field and ensuring that we’re not re-inventing the wheel. Hacking is about writing code as fast as possible.
- gnulinux 8y agoA good software engineer should be able to do both of them successfully.
- munificent 8y agoYes, I read a few papers and poked around the source of gofmt, clang-format and a couple of others. They weren't as helpful as I'd hoped, but I got a few ideas from them here and there. Most of the implementation of a formatter is grunt-work stuff that's fairly specific to the grammar of the input language, the style rules it's trying to apply, and the weird vagaries of whatever parser or lexer you're using. There isn't that much I found I could take away from them. The most useful research I did was actually around graph search algorithms. Branch-and-bound and most of the other stock pathfinding algorithms didn't work, but they gave me the pieces I needed to get to something that did. Dynamic programming and memoization was key too. I got to use so many fundamental data structures and algorithms in this program. It was a joy.