Are markup languages actual programming languages?

What makes a normal programming language better than a mark-up language? Do you consider mark-up languages such as HTML and XML to be true programming languages? And what about lightweight markup languages such as WikiText and Markdown?

Attached: 1ec2c72ea8ea30c6674c1c023bd5cd8855b65ef593830ef9c940a34dbcb68aa2.png (1277x1080, 1.68M)

Other urls found in this thread:

en.wikipedia.org/wiki/Turing_completeness#Data_languages
jinja.pocoo.org/
paste.debian.net/1074686/
twitter.com/NSFWRedditVideo

It's just domain of intended use. Some markups like LaTeX can be used for general purpose computations. Most, like HTML (no JS or CSS, as neither of those is markup), can only be used directly to represent format, rather than general purpose computation. They are built for the primary purpose of displaying text and being able to do otherwise with them isn't really enough to not consider them markup languages, just potentially turing-complete markup languages.
These aren't scientific labels. It's general consensus. You considering a markup language a programming language doesn't change what you can and can't do with it.

nah, if anything i would argue they're just formatted data that can be parsed by a computer program

babbage, confusion of ideas that would prompt such a question, etc.

No.
en.wikipedia.org/wiki/Turing_completeness#Data_languages

Maybe.

Attached: DeclarativeProgrammingClassification.png (588x307, 21.62K)

is it turing complete?

It depends, but generally no.
Not really.
Definitely not.

The primary purpose of a markup language is to mark up the content. This means for example that I need to be able to clearly state that a piece of the text file is a heading, another piece a paragraph, another piece a list item, and so on. In that regard a markup language is not a programming language, it describes content, but no logic.

With that said, some languages do include the ability to also do logic to some extent. For example TeX is designed to mark up text for typesetting, but you can also use TeX commands to control the TeX process itself. This is where lines get blurry. You could also use XML to control the flow of a program in implement actual logic in it (I'm not saying that's a good idea). Markdown is an example of a pure markup language, all you can do is describe the content, but you do not get any control over the interpreting process.

Oops, I misread the first question.

They serve totally different purposes, so the question doesn't really make sense. A programming language is for implementing program logic, for making things happen. A markup language is for when you already have a thing (i.e. some text), but you need a way of expressing it in a machine-readable way. The machine can then take your markup and process it into another thing. For example, if you have a food recipe in mind you write it down as HTML and a web browser then transforms it into a nice graphical representation.

The downside of pure markup languages is that due to the lack of logic you cannot automate anything. Let's say you often want to repeat some piece of text:

< All work and no play makes Jack a dull boy
< All work and no play makes Jack a dull boy
< All work and no play makes Jack a dull boy
< All work and no play makes Jack a dull boy
< All work and no play makes Jack a dull boy

I have had to write this explicitly down five times. What if I made a typo? I would have to correct each line individually. What if I want it written 12 times, but I don't know how many times I have already written it? I would first have to count how many times I have written it, then subtract that number from the target number, and finally copy paste one line that many times. Now what if every line had a little variation (like printing the line number)? Now even copy-paste has failed me.

If the markup language had logic capabilities I could embed a loop like
for i in 1 .. 6: printf("%i) All work and no play makes Jack a dull boy", i);
and have the programming language generate all those lines for me. However, programming language bring with them complexity and security issues, now you have to be careful that your text document does not contain malware.

A middle ground could be to use a programming language to generate a markup document. The person doing the generation still has to be careful that the program does not contain malware, but the generated output (in a markup language) can then be given out to people without concern. Static site generators for example generate static HTML pages that way. If you want to play around with generation you could give the Jinja Python library a try:
jinja.pocoo.org/

You write a template, which is a markup file with little placeholder inserted, then run the generator to have those placeholder in the template filled in. The Lisp languages can do something similar and have it built right into the language.

Mark-up langs are for documents.
Document store formatted text. Document get parsed and displayed by a program and are as such arbitrary data AND NOT A PROGRAM!
Images, text, videos aren't programs.
Mark-up languages aren't programming languages but mark-up languages. Is that too hard to understand.

Here's a rough tree, so you get it:

Languages:
natural languages: German, English, Italien ...
programming languages:
compiled programming languages: C, C++, etc.
interpreted/JIT scripting/programming(may or may not be compiled) languages: Java, Lua, Python, C#, JS ...
...
text storage languages:
INI-files (Simple name value pairs)
CSS (Stores name value pairs but with scoping and cascading. Good for document formatting.)
>Some markups like LaTeX can be used for general purpose computations.
LaTeX (Yeah you fuckers, storing a math formula is what a document does.)
markup languages (store documents or settings in guman readable form): XML, HTML, MathML ...
...