DEV Community

Discussion on: Quiz: is this a programming language?

 
stereobooster profile image
stereobooster • Edited

can define functions and procedures.

Right. Latest versions indeed contain that. But I asked would you consider initial SQL which had SELECT, INSERT, UPDATE and DELETE to be a programming language? (Without stored procedures and functions)

For example, sqlite doesn't have stored procedures (there is WITH RECURSIVE but again this is later addition).

Thread Thread
 
ashleyjsheridan profile image
Ashley Sheridan

You're deliberately omitting parts of my answer to attempt to make an argument for you. I specifically mentioned that SQL had loops and branching logic. That's been part of it for many, many years (I don't even recall a time when it wasn't).

Can you point to any part of HTML that contains:

  • Loops
  • Branching logic
  • Variables
  • State management

These are all parts (not the only parts, however) that constitute a programming language as determined the definition of the term. I do understand that you're trying to understand the term yourself, and maybe want to make the argument that HTML should be classed as a PL, but that's based on a slightly flawed concept of what a programming language is. This doesn't lessen HTML in any way and doesn't make anyone who knows it and uses it less of a developer.

Thread Thread
 
stereobooster profile image
stereobooster • Edited

I don't omit anything. I'm asking question. I'm trying to pinpoint your definition of a language. I'm trying to understand if bounded iterations are enough or not (that is why question about SQL).

I specifically mentioned that SQL had loops and branching logic

Yes. But my initial question was about SQL which doesn't contain stored procedures. That is why I asked again. For example SQLite doesn't contain stored procedures.

So you say that programming language should contain:

  • Loops
  • Branching logic
  • Variables
  • State management

I will take it as your definition (it is really hard to get this answer from you - you're so focused on HTML...)

So functions are optional? (You didn't mentioned them)
What the difference between Variables and State management?

Thread Thread
 
ashleyjsheridan profile image
Ashley Sheridan

Stored procedures are not the same thing as branching logic. Does SQLLite contain branching logic? Absolutely. Can HTML? Absolutely not.

Isn't this entire thread specifically about HTML? Given that, is there any wonder why I try to keep the thread on topic (your topic), which is HTML? Also, I have mentioned before, it's not my defintion, it's the definition of a programming language. You seem to have a version of the definition which is yours but it doesn't match the industry definition.

Functions are option, yes. Look at BASIC, which has no functions, but is 100% a programming language.

State management isn't the exact same thing as having availability to variables. For example, direct memory access could be considered a form of very low level state management, although without the use of variables this would become incredibly complicated. Some languages also abstract away some kinds of state, in ways that aren't available to your program. For example, a basic foreach loop that iterates across an object. Not all languages make the internal pointer mechanisms available via variables (or at all), but there's certainly a state being managed there.

On the flip side, HTML has none of that. It describes content, and that's it. At a basic level, you could compare an HTML document to information stored in memory. Each block of memory (e.g. each HTML node) has a start and end position, and can have pointers to a parent, previous and next sibling, and x number of child nodes. There's nothing beyond basic connections between items, no concept of any programming functionality.

Thread Thread
 
stereobooster profile image
stereobooster • Edited

You seem to have a version of the definition which is yours but it doesn't match the industry definition.

So you claim there is "the industry definition". I wonder how we can get a definition of that kind. Was there an industry wide vote or something? I missed my invitation.

Just to prevent: If you gonna use quote from Wikipedia as proof. This is not an industry wide definition. This is just a definition of website called Wikipedia.

There is no such thing as industry wide definition. There are people who believe in one definition and people who believe in another. For example Professor Brailsford thinks that HTML is declarative programming language youtube.com/watch?v=4A2mWqLUpzw

Peter Van Roy has a separate category "Descriptive declarative programming" which includes XML, S-Expressions info.ucl.ac.be/~pvr/VanRoyChapter.pdf. HTML also would be in that category

That is why I'm asking for a definition. I'm trying to understand your logic. But for some reason you try to prove me wrong instead of explaining what you mean

Thread Thread
 
crimsonmed profile image
Médéric Burlet

He explained plenty what he meant and you ignore half of his text. Even the official definition of HTML which classifies it as a markup language by its own creator was ignored by you 😂

Thread Thread
 
stereobooster profile image
stereobooster

HTML which classifies it as a markup language

I said it before. There is no proof that markup language can't be a programming language as well. What about Postscript?

Here is another definition of a programming language:

A programming language consists of (1) a syntax, given as a formal grammar; and (2) a semantics

1: w3.org/TR/html52/syntax.html#syntax
2: w3.org/TR/html52/dom.html#elements...

Just to remove this argument about "official definition"

Thread Thread
 
crimsonmed profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Médéric Burlet

Why you keep changing the subject we are talking about html and not postscript not brainfuck not javascript.

Waste of time I'm going back to blocking you. If you can't even read a simple rfc which is written by the creator of the languages then clearly you have ko will to learn.

Peace out