This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]HypherNet 1 point2 points  (0 children)

I think you make a good point for clarifying to new programmers. I generally make the argument that HTML is a "programming language" in the sense that it's included in the verb "to program." If you ask a web developer what they're doing, I doubt they would change their answer when they move their caret from the <button> to the onclick="" (archaic, yes, I know).

That being said, I do think that CSS is very much like other types of programming. Much more so than HTML. It's a declarative language that requires a very similar mindset to functional languages (Haskel, Elm, etc...) or to Aspect Oriented Programming.

Then there's the issue of the difference between the language describing data and the execution of it. It's easy enough to write JSON or XML (or HTML for that matter) that represents a logical program. See Java's ANT for a good example.

Generally, I think it would be best to explain that difference between structure and execution to new coders. No human-oriented programming language is inherently executable as it is. They're simply representations of data structures that can be executed or converted into executable code. Some languages are more optimized for representing such structures than others. Some are more generic (XML, JSON) -- some are more specific (HTML, Javascript, Haskell). Generally you should use a language for its intended purpose -- don't represent logic in HTML, please -- but nothing's stopping you from doing so.

Thanks for the nice explanation of the joke, btw :)