Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

DAxelrod (4649)

DAxelrod
  (email not shown publicly)

I'm interested in hard problems.

Recently, I've started thinking a lot about what CP6AN might look like.

Class::MOP and the Perl 6 Metamodel make me more excited than I'd like to admit.

Also expect occasional wordy technology-related rantings.

Journal of DAxelrod (4649)

Thursday October 19, 2006
03:22 PM

The False Dichotomy of Content vs. Presentation

[ #31361 ]

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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • The quote you’re looking for is in the introduction to SICP.

    • Thank you. That's not where I saw it, because I haven't yet read SICP [mit.edu], but its orgination there is yet another reason to put that book on my increasingly large "must read" list.
      • 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