What is a PL? Survey says: SQL yes, Excel maybe, HTML no
Following up on the "What is a programming language?" survey, it appears there's a wide range of disagreement amongst my readers of what constitutes a programming language. I attempt to analyze possible sources of disagreement.
This note is a follow-up to the survey in my previous note, What is a programming language?.
IMPORTANT: Before reading onwards (and biasing yourself), I encourage you to fill out the accompanying survey: https://goo.gl/forms/CuZJEziNTIRU3Q4p1
Previously, I asked: what is a programming language? I have my own crazy ideas, but I wanted to hear from you. And you overwhelmingly responded:
The above graph was generated from this survey (as of 1/25/18), where I asked readers “Yes/No/Abstain” to whether a number of tools should be considered programming languages. The values graphed are the percentage of people who think that the tool is a programming language (excluding “Abstain” results). The respondents largely consist of readers from Hacker News and Reddit. I will continue to update the graph as more readers respond to the survey.
- Verilog: most agree Verilog, the hardware description language, is a programming language, although it had one of the highest rates of abstention. Respondents likely agree that even though the output of the software is hardware, the process of generating the hardware is still programmatic.
- SQL: A comfortable majority agree that SQL is a PL, but many are presumably turned off by its lack of Turing-completeness. SQL after all does not have for loops and classes, but it does still have arithmetic expressions, functions, and variables.
- C preprocessor: I’m fascinated that more respondents consider the C preprocessor a PL than regular expressions. The C preprocessor is, essentially, a string replacement engine that’s less featured than regex (see Rust macros for a more regex-y style of macros), but that is only used for generating C code. So respondents appear to believe that the fact that the language is being used to generate code is the key factor making this a PL.
- LaTeX: The closest language to the border—respondents are split on whether the famous document specification language is a PL. LaTeX has variables, functions, and many other PL-like features (LaTeX is Turing-complete!), yet because its output is a document and not general-purpose, I expect many don’t consider it a language.
- Regex: surprisingly few respondents agree, see C preprocessor for comparison.
- CSS: Getting into the web languages, a minority of respondents consider CSS a programming language. After all, it is purely declarative (well, almost, and extensions often include variables and mixins).
- TensorFlow: This one also surprised me. TensorFlow is a dataflow language that has variables, loops, a compiler, and more. Yet, presumably because it’s a domain-specific language, and it doesn’t have a standalone syntax (it’s programmed usually via a Python API), most respondents don’t consider it a programming language.
- HTML: Probably same reasons as CSS.
- JSON: JSON is a data specification language, which most people seem not to consider a programming language, like because there’s no evaluation (expressions, statements, etc.).
- Microsoft Word: GUIs can’t be programming languages!
- Eclipse: Definitely not code GUIs!
For an alternative perspective, I encourage you to read my earlier post, wherein I make the claim that all of the above are programming languages. That means when it comes to things like Eclipse, I am the 1%!
Discuss this on Hacker News or send me an email at firstname.lastname@example.org.