| Tabs vs. spaces would not be an issue if we let go of the stone-age practice of storing source code as text files. Every moment you spend cleaning up Windows-style EOL characters or transforming tabs into spaces (or vice versa) - or programming your editor to do so - is a moment of your life that could have been put to a better use. With a standardized S-expression format (it could even be human-readable, as for example, Lisp source is) all possible source files which result in the same syntax tree would have the same canonical (by definition) representation. Yes, this means that parsers will need to parse comments rather than toss them, but implementing this minor trick is not a challenge for anyone who has read a few chapters of the Dragon Book (or its imitators.) Your editor can still show you exactly what you want to see. And other people will have the same ability. If you are using Eclipse (or whatnot) to magically reformat source to your personal tastes every time you edit anything, you have already quit pretending that the original raw human-readable representation is worth much. All I'm suggesting is to take this process to its logical conclusion. Storing source as ASTs instead of ASCII would, among other things, increase the usefulness of revision control systems. It would eliminate the need for programmers to agree on any formatting style at all. |
What about broken code, though, would I not be able to save that?