HTML IS a Programming Language (Imperative vs Declarative) - Computerphile

preview_player
Показать описание
The professor took a lot of stick for calling HTML a programming language - here he shows why it can be described as a language, albeit a special purpose one.

This video was filmed and edited by Sean Riley.

Рекомендации по теме
Комментарии
Автор

*I programmed this text to be bold in the YouTube programming language.*

LlewellynvonHellen
Автор

Why are people even debating this? Anyone with any web development experience knows HTML only describes a static layout. It describes by itself completely immutable content. Absolutely indistinguishable from any other markup language: all of these need to be parsed by an external program to be presented in any capacity. It doesn't matter whether it could be represented similarly in a set of full hard-coded calls in a functional language. Any static data could. Both are sufficient and comprehensive representations of the data. On the other hand, a program expresses itself through inner state mutation (in the imperative paradigm) or at least some transformation of data inside the program space (in the functional one). As for the state, HTML is unable to exhibit imperative properties (without running the JS it embeds). As for the transformation, HTML is also unable to have HTML tags crunch themselves into another HTML tags. It just is plain data, and is designed this way so it represents at least a snapshot of a webpage at a point in time. Qualifying HTML as a program is ridiculous!

HyperMario
Автор

I think SQL would have been better example of a declarative language.

MadSquareW
Автор

I've watched this video a couple of times and it seems reasonable, he explains it pretty clearly. He even said at the end that HTML can not be considered as the fully functional programming language but some of its aspects can be.
Why do people disagree with it?

CatsCoffeeGuitars
Автор

I can see professor's point now. I took this from the dictionary, so in a broader sense, he's right:

"Programming: The designing, scheduling, or planning of a program.

Program: An ordered list of events to take place or procedures to be followed.

Language: A system of signs, symbols, gestures, or rules used in communicating."

dalguete
Автор

Why do they always put the word gullible in the description?

dbsirius
Автор

In that sense every file conveying any kind of information is in a sense a declarative programming language. An image is really just a declarative programming language of lots of "function calls" that put the colors on the screen. So where do you draw the line (no pun intended :^) ) between programming languages and just "information"? I think Turing Completeness is probably the best indicator we have.

CryZe
Автор

Who says that the programming language must contain conditional statements or be Turning Complete?
Because Britannica says: "Computer programming language, any of various languages for expressing a set of detailed instructions for a digital computer."
And HTML is a set instructions to Web Browser, expressed in some kind of tag language.

nastykhan
Автор

I am always sad to see how hard is to most programmers see the grey out of black and white. We are the ones who should be solving the problems, but most of us can't even see them. It can be seen as programming language and this professor gave us good arguments to do so. When convenient we CAN see it as one at some extent and it doest hurt anyone... It isn't football or EU referendum guys. Just take it easy.

thsposito
Автор

If you look at JSX and React, the JSX declarative syntax looks very similar to HTML and essentially references the React component functions underneath. So can see the reasoning here that the declarative syntax could be thought of as a function that the browser then interprets, given the arguments passed along as part of that syntax.

mrjasongorman
Автор

LOL to the people who has never attended a CS class and still think HTML is not a language!!

iseslc
Автор

I remember for a while working with ISPF on the mainframes and I was amazed at how easy it was to throw together applications that didn't even know about one another into a easy to use user interface. If you need to do some unique programming you could do that too. I put together an office automation program in a couple of days and people thought I was a genius. I guess HTML is about the closest thing there is to that today (except on mainframes where ISPF is still in use).

MacBeach
Автор

To the people saying you have to be able to, say, implement a FizzBuzz in HTML for it to count, remember that a FizzBuzz is just a program that outputs a particular sequence of lines. There no requirement that it uses loops or checks at all you could just write it out in HTML.

mutedajar
Автор

I don't take any umbridge to the Professor using the phrase programming language.

Unless you're writing machine code, surely every other interaction with a computer is interpreted anyway?

izzieb
Автор

HTML used to be a markup language for static webpages, but not anymore.
If you look around now, in 2022, you can see it's starting to be applied a bit differently.
Electron, Web view applications. HTML is now used for GUI programming, replacing "native" gui kits and cross platform.

Griimnak
Автор

1:22 I really wanted to see "whatever" in that animation... :(

yoyofargo
Автор

It's really not, though. Unless you also call Word documents programs. It's a file format. It's a language for describing structured data. It can't be meaningfully executed. It's stateless. If you call HTML a programming language the term "programming language" ceases to have any useful meaning and you might as well call every interaction with a computer "programming".

lnplum
Автор

All of those in this comment section arguing (exposing and explaining their own reasons and arguments) for and against considering HTML a programming language have all my respect even through I might disagree with half of them.

However, all of those saying "HE'S DA PROFFESSOR HE KNOWS MOAR THAN YOU DO BECAUSE HE'S DA PROFESSOR SO SHADDAP"... you all are pathetic.

isawadelapradera
Автор

A program is a collection of commands that tell a computer what to do (in some context). HTML is a series of instructions that tell a computer what to do. Therefore it is a kind of programming language.

mwildish
Автор

Awesome video. Either way. Definitely trying to address a polarizing debate. And getting us all educated at the same time!! I feel very comfortable with declarative vs. imperative now.

jammaday