DEV Community

Discussion on: What is a Programming Language?

Collapse
 
elmuerte profile image
Michiel Hendriks • Edited

HTML is a markup language. Of course that does not say it is not a programming language, as TeX is both.

XML is a grammar, a more strict version of SGML. Based on XML you can create a programming language. For example: XSLT is an XML based programming language.

I think the best way to say if something is a programming language is if it is Turing complete.

HTML lacks the features to be Turing complete. CSS on its own also lacks the features.
But combined you can create a so called Rule 110 system, which is Turing complete. (Just search for "Rule 110 css" and you find plenty examples.)

So HTML+CSS is Turing complete, it can be considered as language with which you can write a program. And thus a programming language.

But I would never call it a programming language. Because that just dilutes the meaning of the word. And for what reason? Just because something is not a programming language does not make it worth any less.

SQL is Turing complete. But it is still a query language, and not a programming language. Minecraft redstone is Turing complete, but it is not a programming language. etc.

Languages or systems which are unintentional Turing complete can be considered esoteric programming languages. Their main value lies somewhere else, in a more specific domain.

Collapse
 
renegadecoder94 profile image
Jeremy Grifski

I also have to challenge some of the arguments here. Why mention Turing completeness as a criteria if you ignore it in some cases? Why does designer intent matter more than practical use?

Collapse
 
elmuerte profile image
Michiel Hendriks

As I said, it dilutes definitions. Terms become meaningless if you make them to broad. If we would consider SQL a programming language, then we would also consider somebody who's main role is to write SQL a database programmer.

One of the main issues with natural language is that it is really unclear about meaning of words, and sentences, and sometimes even paragraphs. If we keep making definitions ambiguous it will only get worse, and we could literally(*) lose its purpose.

*) this is just an example where this word has been misused so often, that literally has as alternative meaning "figuratively".

ps, I would not say that SQL, HTML+CSS, Minecraft Redstone have a practical programming use; it's rather impractical to use it as programming language.

Thread Thread
 
renegadecoder94 profile image
Jeremy Grifski • Edited

I guess my point was that you don’t really further solidify a definition. You provide some arbitrary criteria (Turing Completeness) that you simultaneously violate (some Turing Complete languages aren’t programming languages).

In other words, it seems like your criteria is more of a feeling or bias rather than something that can be verified.

At any rate, I do appreciate the discussion! I think you raise a good point about diluting terminology. I’m just not sure it’s an issue in this case.

Collapse
 
iamschulz profile image
Daniel Schulz

I'd say that query languages and markup languages are a subset of programming languages.

Your Minecraft example is interesting though, because it's easily translatable to graphical programming like puredata. You don't write your stuff per se, yet you're programming, with a specific set of rules, grammar, etc. If not programming language, how would you call that?

Collapse
 
elmuerte profile image
Michiel Hendriks

I think Minecraft redstone can be better qualified as a FPGA.