|
|
|
|
|
by bennofs
2012 days ago
|
|
One problem with this is that formatting now becomes a multi-file thing. You have now have to figure out what names actually refer to, which depends on building a project model to correctly resolve imports, etc.... Compare this with traditional formatters, which you can run on each single file individually, this is much more complex and also harder to parallelise. |
|
If the program has syntax errors, nothing can happen, how would it know how to format it self if it is not correct?
Perhaps the approach is very different in lisp (and smalltalk which I have some experience with), there is no parsing of the program from the outside - or - if you take that approach and treat the s-expr as dead text you have to sort of reimplement the parser (or the system) in order to have some understanding of it, which in my mind seems very inefficient.