Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As mentioned, HTML is indeed a programming language. But it’s one that is rarely used on its own. So you could argue that having it as a thing of itself in these lists, makes little sense.


I contest this. It has no features of programming languages: no way to set or read variables, or to evaluate expressions, or any kind of flow control.

If it’s a programming language, so is Markdown. (It’s not, either.)


Take a look at this conditional here:

<picture> <source media="(prefers-color-scheme: dark)" srcset="logo_dark.svg"> <img src="logo.svg" alt="logo" width="48"> </picture>


"(prefers-color-scheme: dark)" is CSS


HTML on its own is not Turing complete, so it’s not a programming language in any practical sense. It’s a markup language.


There are non-Turing complete programming languages, and there are many things that are Turing complete but have nothing to do with programming (even PowerPoint), so this is neither a required nor sufficient property.

I believe a reasonable way to categorize languages as programming or not is simply.. what is it's primary use case. HTML's last two letters tell us exactly that it is not a programming language.


not sure if that's a good criterion. There are also non Turing complete languages like core SQL or Rocq that definitely feel like programming.


Things can and often do feel like other things that they are not.


I think "A language often involved in the process of making computer programs" is way too weak to define a "Programming language". A programming language at least needs to have state/expressions/logic. I'm sure there is a good definition, but if we allow html then any markup is programming and that's obviously false so the line has to be drawn somewhere.

The reason this debate is so strange is because some people think it's gatekeeping to say someone who writes html for a living isn't "programming". It's nonsense.


HTML isn't turing complete




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: