On Fri, May 16, 2014 at 5:00 PM, Marko Rauhamaa <ma...@pacujo.net> wrote:
> Well, actually, any .py file *does* specify a unique AST. Nothing would
> prevent the text editor from presenting it according to your
> preferences. They all do that to a degree anyway (colors, fonts), but
> they could take even more liberties (which some IDE's do: hiding/showing
> comments and function definitions).
> There are tools that reindent and refactor code automatically. The text
> editor could do that on the fly.
You still haven't answered my biggest objection from earlier. Source
code contains more information than the AST does; even if you make a
frAnkenSTein's monster that includes comments, there's still the point
that whitespace carries information, and that information is
frequently communicative of the programmer's intent. Any automated
reformatter destroys that information, and that is, by definition, a
net loss to the code. How do you propose to fix that? Or if not, will
you at least acknowledge that the AST cannot perfectly transmit what
the source code says?