|
|
|
|
|
by hinkley
901 days ago
|
|
I hope somewhere on the far side of CRDTs, we start trying to model code edits the way humans either do or 'should' do code edits, because treating them as 'anything can change' seems to be the most expensive part of running things like IntelliJ or Webstorm. I almost always check out a file that actually runs and passes tests, which means I started from a coherent and valid file. Then I break that file, by inserting or removing a concept from it. Most of the time I'm going to end up with a file with a new logical block in it, and all of the other blocks returned to their initial state. So instead of maybe treating the entire file before the edit as valid, and the entire file after as garbage, we should be trying to preserve as much of the semantics of the original file that we can still locate in the new file, and treat the bit in the middle as the garbage. You can especially notice this in languages where private helper methods tend to migrate to the bottom of the file instead of up to the top. Autocomplete is basically useless until you start refactoring the new code. This article is about having an audience of 10+, but we haven't even really solved an audience of 1 or 0, and I suspect at least 80% of the problems are shared between them. |
|