5 ms·
Is HTML a Programming Language?
- orionblastar 12y agoHTML is a presentation language, XML is a data language, JavaScript is a programming language. HTML is more like Powerpoint, XML like MS-Access.
- mattmurdog 12y agoHTML is like Powerpoint? Wow, if only it was that easy. It's more like Excel IMO if we really want to make such an asinine comparison.
- orionblastar 12y agoWYSIWTG editors make it easy like Powerpoint. Like the old Frontpage used to do or Blue Griffon: http://bluegriffon.org/ http://bluegriffon.org/
- crimsonalucard 12y agohow would I add two numbers in html? <p>1+1=2</p>
- dotdi 12y agoQuote: "However, if you are configuring an application by setting its preferences, or an operating system by manipulating its system files, or a webpage by marking up its text with HTML, anything that will set up the future behavior of the computer to accomplish something for you, then these are activities that are so closely akin to anything essential that can be said about what programming is, that I no longer see the point in trying to forge a distinction." Not programming, not programming and, yes, not programming.
- drew-y 12y agoThe green text on a black background makes this incredibly hard to read.
- vorg 12y agoJust whip up a little Javascript function and drop it into your HTML between the relevant tags and refresh your cached page. Oh wait... I meant reprogram the color settings in your HTML.
- AlexeyBrin 12y agoOr you can modify the CSS: <style type="text/css"> body { background-color: white; } .bodytext { color: black; } </style>
- drew-y 12y agoI just think its somewhat ironic that an article on the power of html has such poor page styling.
- oxymoron 12y agoI'm not sure where you're seeing all this controversy, nor do I quite understand why you're so upset about it. Nevertheless, why don't we just judge HTML in terms of its intended purpose? Before CSS and Javascript and the separation of semantics, presentation and behavior I might actually have agreed with you. At this stage, though, I'd venture that HTML is designed for the purpose of describing the semantic notions of a document rather than computation. Since you ask us to be humble I'll oblige and concede that not all programming languages have to be turing complete (there are useful languages that aren't). But surely it has to be designed with computation as a purpose? Even CSS fullfills that criteria to a higher degree. If not, you might as well argue that any arbitrary language at any level in Chomskys hierarchy constitutes a programming language. It's been a while since I read SICP but I really don't think this is what Abelson and Sussman had in mind.
- cshimmin 12y ago> I'm not sure where you're seeing all this controversy, nor do I quite understand why you're so upset about it. FWIW, the post is from September 2003: http://web.media.mit.edu/~pliam/res/blogettes.html http://web.media.mit.edu/~pliam/res/blogettes.html
- fungos 12y agoNo.
- eurleif 12y agoThis article does not mention the phrase "Turing completeness" once. The core of its argument is just a half-assed comparison between HTML and machine language, because neither has explicit control structures, and HTML links are kind of like implicit control structures if you squint really hard. Lame.
- naturalethic 12y agoIt doesn't mention declarative either. And perhaps xslt, a Turing complete, declarative functional language should be mentioned as well since it looks a lot like html.
- jp_rider 12y agoAs an aside, HTML5 and CSS3 are [turing complete](http://lambda-the-ultimate.org/node/4222 http://lambda-the-ultimate.org/node/4222).
- timmaxw 12y agoI wouldn't count that as Turing-completeness. It requires the user to repeatedly press the tab and space keys to advance the computation; the amount of computation that the CSS is doing for each press of the tab and space keys is trivial. Many systems that are not normally considered "Turing-complete" have the same property. For example, one can construct a finite state transducer that takes a Turing machine state as input and produces the next state of the Turing machine as output. Repeatedly applying this transducer to some input string will simulate a Turing machine, but finite state transducers are not considered Turing complete.
- Cushman 12y agoCan you explain why you feel that disqualifies it? The required input doesn't make any decisions, or hold any state as in your example; it's just "turning the crank" so to speak. Even a CPU needs a clock, right?
- 12y ago
- hyperliner 12y agoIf we define a programming language as a "language designed to communicate instructions to a computer," and then we observe that most "traditional" programming languages require an intermediary to make the computer "do what the program intends" (such an intermediary being a compiler or a runtime or some other transformation), then one could argue that HTML is a language, and the browser is such intermediary. Therefore, HTML is a programming language, IMHO. It may be "primitive" in the pecking order of programming languages based on some arbitrary definition of sophistication, but it rises above the stated definition.
- zzalpha 12y agoBy this definition any input that a program processes would qualify, since inputs by definition "instruct" the program how to operate. At that point you've robbed the term of any useful meaning.
- hyperliner 12y agoInputs are not instances of a computing language. They are arguments or parameters to the program.
- zzalpha 12y agoHTML is not an instance of a "computing language". HTML is simply an input to a program.
- biggerbob 12y agoThis guy's talking out his arse. > "Most linguists would agree that if you are using any formal system of symbols or codification to communicate such a plan, then you are using a language." No, communicating a plan constitutes what linguists call a "communication system" which doesn't necessarily meet their definition of a language. > "if you are using machine language [...] All you have to work with at that level are binary codes which you store in a list and feed to a processor; no logical, no iterative, no conditional constructs are there for you." What? JE, JNE, JGE, JNZ and so on are obviously conditional. And logical. What the hell is wrong with this author? > "if your own education and thinking has you convinced beyond any doubt that HTML is not a programming language [...] Go get some more education at an institution other than a glorified vocational training center" What a pompous cunt.
- halosghost 12y agoHonestly, I was expecting this article to go a completely different way. Namely, I expected it to talk about how <canvas> is Turing complete (and therefore, should be valid consideration as a programming language as much as LaTeX or Cxx templates are). There's certainly use in confronting elitism and FUD, but having a technical kernel (see what I did there? :P) of truth supporting a more abstract argument would be far more compelling imho. I'd really love to see more discussions about <canvas> and what it means for the future of HTML as a language (and whether or not it will come to be a more fully-fledged programming language itself).
- eurleif 12y ago<canvas> doesn't do anything by itself; you draw on it using JavaScript. Someone could argue that because JS can be embedded in HTML, it's really a part of HTML, which makes HTML a programming language; but the HTML standard does not require JS support, and most browsers have an option to disable support, so I think they are separable.
- halosghost 12y agoImho, your latter statement would be true except for the inclusion of <canvas> which is there specifically to allow it to be manipulated by JS. You are, of course, correct though, <canvas> is not actually Turing complete without JS; but then a Turing machine cannot operate without both the ticker tape and the pen to write on it. Given that, JS + <canvas> seems to be a near perfect analog to a Turing machine to me. (Though, I can think of numerous ways that someone might disagree.) Either way, I would still like to see more in-depth analyses of this interaction; and I find it odd that a discussion of HTML as a programming language would make no mention of it whatsoever.
- BraveNewCurency 12y agoIf you have JavaScript (obviously Turning complete by itself), why do you need canvas?
- mrj 12y ago
- deleted 12y ago[deleted]
- bunderbunder 12y agoThis article prompts a staccato of reactions in me. The first is to observe the Argument of the Beard. Next is to think about how telling your VCR to start recording whatever's on TV at 3pm and stop at 4pm is known as programming it. After that I get lost in a quagmire of musing whether SQL is a programming language. After that I start thinking about Turing completeness, followed quickly by the observation that there are things that are Turing complete that I would not consider to be programming languages. And then at some point I realize we're just idly shuffling words and the meanings of words around the table. That's where I suddenly lose interest because I've really got no reason to have a problem with the current vernacular meaning of the term.
- projectramo 12y agoThere are two ways to go about answering this: 1. You could try a formal definition -- such as Turing completeness 2. You could accept a colloquial definition. This definition has to be extracted from the things that people call programming languages. If you opt for #1, then you have to accept you have abandoned #2. There are things that are Turing complete which people in the ordinary use of English may not think of as programming languages. (For instance: an actual Turing Machine with the infinite tape). If we go with #1, knowing full well that it may be counter-intuitive, then we are left with a technical question which, at least, can be answered. You can see if rule 110 or whatever can properly be implemented. You can decide if some feature of the browser allows for it and so forth. At least you know what the exercise is. If you decide you want to capture people's intuitive sense of a "programming language" then you have to intuition monger. I think intuitions are informed by the use of the word "language" as well. So, for instance, people may "program" a VCR, but no one calls that using a programming "language." This is because it does not feel language-like to us. Same with an actual Turing machine. If you transcribe the instructions of the Turing machine into instructions like "1 - go forward, 2 - print a 1, 3 - go back" etc, then suddenly it "feels" like a language. If you accept that you are intuition mongering, I think you would have to poll people who are familiar with HTML and other languages and ask them. (I suspect they would say, in general, that it is not). Of course, #2 may change as the language evolves and our sense of what a "language" is evolves with it.