opening a text document to show a .txt file through a browser link

Jukka K. Korpela jkorpela at cs.tut.fi
Mon Dec 30 19:04:33 EST 2002


Michael Clark <in at the.sig> wrote:

> We know HTML is a language.

Calling markup notations and systems like that "languages" is actually 
more confusing than anything useful. HTML (or Python or Perl or TeX) is 
surely no language in the normal sense of the word; how do you say 
"let's relax" or "the new year's eve is coming!" in HTML (or Python or 
Perl or TeX)? You can say that in _any_ human language. The fact that 
you can't say anything like that in a programming "language" or markup 
"language" is revealing.

But the real confusion here is confusing markup with programming. And 
pointless crossposting, which I'm trying to stop once again, i.e. 
followups set.

> We know tags are instructions. 

You know less than nothing if you think that way about HTML. Yes, it 
_is_ possible to know less than nothing. That's what disinformation is 
about.

> <p>hello <strong>world</strong></p>
> 
> Carries the instructions to treat the entire block "hello world" as
> a paragraph and set the word "world" aside from hello in a manner
> indicating it is stronger.

No, it is no instruction. It is declarative, not imperative. Would you 
consider the statement "this is an apple" as an instruction, or a 
command? If you think it implicitly means "eat this!", then that's your 
problem.

> Before getting into it, I would like to say that I do not think
> anyone can be right or wrong on this topic.

It's actually much clearer than 1 + 1 = 2, which is relative to the 
definition of addition. But you have the liberty of thinking that
1 + 1 = 2 (in standard arithmetics) is just an opinion.

> are regular expressions a form of programming? 

Of course not. What ever made you think they might be? Are numbers 
programming, just because you can use numbers in programming "language" 
statements?

> Now, I tend to agree in a theoretical sense that HTML is not a
> programming language.

Would you also say that you agree in a theoretical sense that 42 is not 
a program? Fine. But there would be something odd in putting it that 
way.

> Especially if you read the most recent
> documents about content vs. presentation (i.e., HTML should not
> suggest layout, only content.  CSS should suggest layout).

The most recent?? That's what HTML has been all about from the 
beginning. There were some temporary periods of insanity when people 
tried, in vain, to turn it into a desktop publishing "language"; it 
failed, and even if it had been successful (i.e., if we had yet another 
desktop publishing tool to compete with systems and software developed 
ever since the 60s for such purposes), it wouldn't be programming, any 
more than using Microsoft Word for composing a document is programming.

> In fact, in practice, much of the time spent writing HTML today is
> probably spent refining the "code" so that the "instructions" are
> "interpreted" by the computer correctly.  E.G., lining up that
> table with the image!

Do you really do such things when writing a program? You have a lot to 
learn about programming, too, then. It'll be fascinating in its own 
way.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html





More information about the Python-list mailing list