Definition
I would say that something is programming language (PL) if:
1: there is a machine that can do some actions (computations) b...
For further actions, you may consider blocking this person and/or reporting abuse
I don't really care for the "PL or not" debates, but an interesting question popped into my headโwould you say Markdown is a programming language? Because it satisfies condition 2 (since HTML is also a programming language, in this view).๐ค
Yes, it is a PL, by a given definition.
But markdown is almost a plain text. Is the plain text a PL? No. And here is my reasoning for it - in the case of plain text machine doesn't interpret it, it simply passes it through.
Imagine teletype connected to the machine, you input some text and in response machine do some actions, for example, if it sees markdown tag for the header (
# h1) it will print text (on paper) in a bigger font.Now imagine a machine that does not support tags, and simply passes through text as-is. You can as well remove the machine and shortcut wire from teletype to printer. When you can "shortcut wires" it means there is no need for the machine. If there is no machine, then it's not a PL.
I don't think that your definition of a programming language is actually what is the agreed upon definition in the industry.
A PL is a series of instructions, used to implement algorithms, perform data processing, and is something that is executed. HTML does none of these things, it's merely a language used to assign some semantic meaning to data, in exactly the same way that markdown does. HTML and Markdown are parsed by something else in order to produce output, by themselves they cannot do anything.
Something like XML on the other hand absolutely would be a programming language. It can perform processing (via XSL which is an XML subset) with loops, jump points, etc. The only way HTML can perform the duties of a programming language is with the help of an additional language, such as Javascript (or possibly CSS, but it's pretty contentious and depends heavily on the parser involved)
I doubt anybody ever made industry wide survey to agree on one definition. So my definition has the same footing as yours ๐คทโโ๏ธ
Your definition: A PL is a series of instructions, used to implement algorithms, perform data processing, and is something that is executed.
There are industry definitions for a programming language, that's not my definition, it's me trying to explain it.
HTML isn't a series of instructions, it's more hints. An H1 tag doesn't make font bigger, it just instructs the parser that the contents within it are a level 1 heading, then it's up to the display engine attached to that parser to do what it likes with that information. That may be to make the font larger (which all depends on CSS anyway, without that it's not going to change a font size) or to speak it out prefixed with "Heading level 1" in the case of a screen reader.
An algorithm also has a fairly well described definition: "a process or set of rules to be followed in calculations or other problem-solving operations". HTML cannot describe a problem-solving process as it doesn't really contain anything close to branching concepts. In order to do that, at the very least you need some kind of loop, state machine, or jumping logic, none of which HTML has.
HTML isn't really executed so much as parsed. Now, the line here is blurry, as there are programming languages out there which have a parsing stage. This process converts it into something else which is then executed. Now, possibly, you could use XSL to transform a structured XHTML document (which isn't quite HTML, it's the nearest you can create using XML) into something which then gets executed, but then you're still relying on an something else to do the work, it's not really HTML itself anymore.
Please provide the source
Totally disagree.
By its name HTML is:
For me a programming language is a language where you can write instructions leading to algorithms or various computations
You don't have loops then it is not a PL and before it gets mentioned yes even assembly which is one of the lowest level language harbors loops.
HTML and MD do not have these capabilities and therefor I classify them in the category of Markup Languages.
Below is a good explanation of the difference between Markup Languages / Programming Languages:
geeksforgeeks.org/difference-betwe...
softwareengineering.stackexchange....
I think that the "name" argument is unsound. It's like saying sea lion is a lion because it has a lion in its name. Why markup language can't be a programming language? If you think this is a sound argument, please explain it to me.
That is a definition. I agree with the essence of it.
HTML has instructions (tags) that make the machine do computations - a machine changes output depending on those instructions (font size, layout, color, etc.). Other machines can do other changes in response to instructions, like add two numbers and store them in the memory...
This is the second addition to the definition. Only loops are required or something else? Are loops bounded or unbounded? (Trying to understand if you are going for Turing completeness or not)
Once again I disagree. The naming convention when creating the Internet where very strictly chosen and regulated for some.
They are also bodies that look into making rigorous standards:
Its not a description of what you see but a description of what it does. This was created to make the Internet work not to have fun creating a golfing language.
I'm sorry but I don't consider tags instructions. Languages are made of tokens and yes that can be tags as that is what is parsed.
Instructions are like operations. Per the name it instructs to do something.
GO TO
LOOP
ETC
I think you forgot the most essential part of the definition.
Leading to algorithms or various computationCould you create a function for the Fibonacci sequence in HTML?
Can you calculate the square root of a number?
Can you do bitwise operations?
Not really as it is a markup language for grouping visual elements into groups.
You claim they use rigorous methodology to name languages. Can you provide a link to the document where those rules for naming languages are described?
tools.ietf.org/html/rfc1866
I'm not gonna go through all the RFC but any you can have a look and see other documents such as: Internet Official Protocol Standards
Also the link I gave you is the official proposition by Tim Berners Lee for HTML. It is clearly said in the first paragraph:
It was clearly defined as a Markup Language not a Programming Language.
I'm also still waiting the code to my previous question on creating algorithms in HTML.
It is an RFC for HTML itself. It does not say that markup language can't be a programming language as well. We back to the argument sea lion is a lion because name says so
Yes its your definition.
You misunderstood HTML it does not say how and it does no rendering.
HTML is predefined and you just say where the browser should render things. The Browser renders things. Its more like a configuration.
If you don't agree - provide your own definition of PL.
Programming is all about configuring a machine
Why does it matter?
From a practical point of view, it doesn't. I'm, as a programmer, can write code and machine will go brrrrrrr.
But it is an interesting question because it tells us something about our industry: