loading...

re: Are CSS and HTML programming languages? VIEW POST

FULL DISCUSSION
 

Yes, CSS + HTML are programming languages. Not only is this scenario technically Turing complete, I think these software fit a lot of the principles of the purpose of programming languages: source code in, magic out.

You can create some of the most incredible things coding html against a browser. No, it’s not as flexible as another programming language in terms of practical possibilities, but it’s a highly specialized language for doing really interesting things.

Distinguishing between programming languages and markup languages when nobody asked you to is unnecessary gatekeeping. If you want me to talk about that distinction, than sure.

The notion of what makes computers go bleep and bloop has always been under re-construction. If you could possibly debate whether something could be a programming language, you might as well call it a programming language because.

 

Turing complete

IMHO an overrated criterion. Many things have been proven Turing complete (i.e. C++ templates) and yet nobody would build actual projects in them. On the other hands lots of projects have been built with nothing but HTML + CSS 😃

 

I remember reading an article about a guy who made a complete RPG in excel.

Excel scripting is Turing Complete.

 

C++ templates aren't a good example though, people do way too damn much with them (see for example Boost or Webkit, both take way too long to build on even a good modern system because they are almost more C++ templates than they are actual C++).

If you're going for a good example of Turing completeness being essentially meaningless for deciding if something is a programming language or not, I would encourage you to instead look at Magic The Gathering.

 
 
 

I agree. Mentioned it in case anyone felt like getting overly concerned about that being a criterion. A programming language is really anything you can write a program in, and if the browser is something you can program against, it seems to fit the bill.

And if, for some reason turing completeness is something you care about, it's technically true as well.

I can can click on a something.html file on my computer and it could launch one hell of a program because it will open in a pretty powerful application environment.

 

Is markdown a programming language?

 

That's another great point! IMO, markdown is not a programming language because it's more for styling text - but that's me coming from a writing background and now I'm thinking about how markdown functions and is built. It's more complicated than I thought at first 🤔

Seems to me you're rubbing up on the same issue as with HTML. It's a markup language used to program how to generate some output!

 
 

By this logic, SVG, PDF, and arguably even JPEG are programming languages.

 

Odd that no one has pointed this out

Everyone is focusing on the "language" part, which without a doubt CSS and HTML are. But what about the "programming" part? Well we don't have a definition there so that bit is a lot more difficult. It becomes a matter of what we "feel" like that term means to us.

At the base level it means making a system do what you want it to do. Of course in that case, so is writing an excel spreadsheet, or drag-and-dropping, or customizing your OS with new colors, or creating a new web app account, or even just calling up IT and telling them to fix things "or else".

That feels wrong.

For some, "programming" means "general-purpose programming"- that you not only can, but realistically might, sit down and code some algorithms in it. In that case sure, HTML and CSS are not programming, and neither is Brainfuck, or Arnold, or the more basic usages of Prolog.

You can't really fault those people for being bewildered at the resistance to what to them seems like such an obvious statement. For them, "HTML and CSS are not programming languages" is not gatekeeping, it's an attempt to educate on what seems to them to be an important distinction.

So why can it be so upsetting to hear it?

I suppose there is another definition we can go with: "Things that might be a central part of the job for someone who works professionally as a programmer". In that case, not only of course are HTML and CSS programming, but hearing that phrase - for someone who is primarily engaged in HTML and CSS - sounds like a denial of their entire career and track.

Conclusion? Maybe we all need to be aware when using terms without strict definitions that they might mean different things to different people.

 

Yep, they're declarative programming languages, you can tell the browser what it should do, but you can't tell the browser how it should do it, for that you need an imperative language (whichever one chooses, I'm not going to open this can of worms now).

 

I think the new hot take should be that prolog isn't a programming language.

 

Yes, it's "source goes in, magic out", but still constrained to a specific context. The type of magic that comes out, while very cool and very vast, is still a small subset of the magic that can come out of something more general-purpose.

I don't understand why it's gatekeeping to acknowledge this distinction. I don't agree that calling something "not a programming language" makes it "lesser than a programming language", but just helps us understand in more specific terms what the tool is and isn't. Why is using multiple categories of language when we talk about our tools dismissive?

 

I agree - good categorization of the languages we have is important.

I think the real problem is when people think or act as if they are superior to others because they know a certain language or category of languages and others don't.

Of course - those people don't tend to be worth your time anyway.

I agree, but I think it’s more truer that markup languages are a subset of programming language vs a different category.

And in this case I think the gatekeeping comes into play when the topic of whether or not these things are programming languages is somewhat unimportant.

So whether the answer is yes or no, pointing it out when it’s unneeded for the conversation is gatekeeping, or could be perceived that way in our imperfect online lack of tone translation.

In a sense, the true gatekeepers have ruined it for anyone coming in with good intentions.

it’s more truer that markup languages are a subset of programming language vs a different category.

The rest of this thread has me convinced of this as well now.

pointing it out when it’s unneeded for the conversation is gatekeeping

I agree, but in this case it was the conversation! You've got a point, though, the people with emotions about this sort of thing aren't usually coming to these discussions in good faith but for some sort of one-upmanship. At the end of the day, of course it doesn't actually matter - just build things. I still think it's useful to classify languages like this, in the interest of making well-informed choices about the right tool for the right job, but that sentence is so uncontroversial I don't imagine anyone disagrees.

Thanks for your response!

Code of Conduct Report abuse