The False Dichotomy of Content vs. Presentation

DAxelrod on 2006-10-19T20:22:16

I unfortunately can't find the source right now, but there's a bit of wisdom that says that programs are written primarily to communicate with humans, and secondarily to communicate with compilers.

I bring this up because of the quote at the top of this perl5-porters summary.

Many of our furious debates over code style, especially whitespace formatting, are annoying precisely because they deal with code at only the human level. The compiler usually doesn't care about tab-stop preferences.

So I started thinking about being able to mark diffs as style changes versus code changes, so that version control history is preserved because you can query only the diffs that actually change how the program runs. I had some ideas about schemes involving some bizzare combination of perltidy, PPI (which can losslessly roundtrip code), B::Bytecode, and optree comparisons.

And then I realized maybe this wasn't such a great idea.

Something a lot of people in web design have been struggling with for years is how to separate content and presentation. Of course, the two really can't be completely separated. Say you have content that is structured purely on the basis of semantics. You want its display to reflect certain aspects of its structure.

It's really similar to trying to separate data and code. Everyone agrees that abstractly it's a good idea so you don't have problems like buffer overflows and SQL injection attacks. But some of the most powerful things computers are capable of require crossing the boundaries of data and code. Turing Machines are powerful for the precise reason of having data-that-is-also-code.

It's all nice for me to say the two should be separate, but it's an unrealistic oversimplification.


Citation

Aristotle on 2006-10-19T22:16:08

The quote you’re looking for is in the introduction to SICP.

Re:Citation

DAxelrod on 2006-10-19T22:36:49

Thank you. That's not where I saw it, because I haven't yet read SICP, but its orgination there is yet another reason to put that book on my increasingly large "must read" list.

Re:Citation

ferreira on 2006-10-20T12:38:42

Maybe you have seen the quote here at use.perl. In the quotes file you find:
Programs must be written for people to read, and only incidentally for
machines to execute.
            --Abelson and Sussman