DEV Community

Discussion on: Is HTML a Programming Language?

 
beastful profile image
Ilya Afendin • Edited

Really, what do you mean by "In realty every programming language must have conditional logic"
Because its true only for imperative programming (or other like Functional, logical, oop etc.)
And html is just non-imperative, non-Turing complete, domain-specific markup language which fully corresponds to standards of declarative programming paradigm.
I would like to remind you that html is not just text styling, it tells computer and server to perform actions based on different kind of data:

  • cookie managements
  • page refresh
  • viewport management
  • http headers management
  • <noscript> element (some domain specific logic)
  • ability to redirect
  • sending http requests (forms)(yes, html can do http requests without js)
  • <map> and <area> elements (domain specific computation)
  • lots of meta tags which should configure the web page and browser look
  • loading management
  • under the hood, html represents DOM (document object model) and every element, for example h1 is not just big bold text hah, its an object, and it has its own properties, it can be accessed in scripts, and also it influences seo.
  • Even the fact that it has its own apis, like for example canvas, already tells that it deserves a status of declarative language

HTML is just too domain-specific, i would say too high level language.
I`m struggling to call it an programming language,
but your arguments are just funny, you have no right to define the status of html, but you can discuss it. Like me, did you even read my replies? I never say things like: "aaa, its absolutely clear, html is programming language, is programming language nether markup nor configurational its PROGRAMMING, i redefine the main definition of programing language, now it should not contain logic or conditions (btw it's required only for imperative programming style, really, read more about that) ahah what makes people to say that html is not programming language are they that stupid?"

i think there are no such words in my comments.

I can't prove that html is not PL
But i can prove that html is a part of Declarative style, and it's not my personal opinion it's fact
en.wikipedia.org/wiki/Imperative_p...
en.wikipedia.org/wiki/Declarative_...

P.S.
My conditions for continuing the discussion:

  • do not reinterpret my words, use quotes if necessary
  • do not create definitions yourself, refer to sources
Thread Thread
 
yawaramin profile image
Yawar Amin

And html is just non-imperative, non-Turing complete, domain-specific markup language

I'm glad we agree that it's a markup language. I.e. not a programming language.

do not create definitions yourself, refer to sources

Buddy, I didn't create the definition, computer science created it: engineering.cornell.edu/programmin...

Programming languages can be used to create programs that implement specific algorithms.

If you can't implement a specific algorithm with it, it's not a programming language.

Thread Thread
 
beastful profile image
Ilya Afendin

No, you did not understand what am I talking about.

"If you can't implement a specific algorithm with it, it's not a programming language."
It only means that it's not Turing complete

I told you the defenition of html, but we did not agree with you, i told that html is a part of declararative programming paradigm.

The fact that you wrote: "I'm glad we agree that it's a markup language. I.e. not a programming language." makes me feel that you just ignore everything else in my comment

And the passage: "html is not programming language" isn't correct,
html is called markup language because it is used for murkup but.
But it also can be defined as declarative programming language

In you link, there were no mentions about the fact that html is not programming language

Progrogrsmming languages can be used.....
can be used....
... and also can't...
What algorithm, did he described
What types of programming are there?
It's not event a defenition

It looks like you didn't read my comment, I'm not surprised

Sereously, reread this, and then generate proper answer.

I will make your life easier, just prove these 3 things:

  • Every programming language should be Turing complete
  • Declarative programming is not programming
  • HTML is not declarative

Your arguments... They like arguments of any newbie in programming who found out what do last two letters in html mean, and now he knows the truth, the undisputed truth.

Reread... My... Comment

Thread Thread
 
yawaramin profile image
Yawar Amin

I'm not talking about Turing completeness here, I'm talking about basic logic. Calculate a boolean (binary) condition at runtime and show a different result depending on that logic. I cited a source, which you want to reinterpret to support your argument, that's fine. We disagree on it. By the way, I'm not attacking your knowledge level personally, I have no idea why you feel compelled to attack mine, especially when it only takes a few seconds to check my profile and post history on this site. Especially when you can't be bothered to learn basic spelling and grammar?

Thread Thread
 
beastful profile image
Ilya Afendin

Why? I Don't reinterpret this, it's not even a defenition it's case specific introduction to an article.

I told you that logic and conditions are only required for imperative programming
By defenition, it's just fact

And html is non - imperative

It s written in those two articles, mentioned above

Just go deeper into these two terms.

Seriously, you did not read what I have written neither about html capabilities no about imperative and declarative programming styles.

We can discuss the status of html forever
Because the declarative programming is not always can be called "programming"

But

The statement "basic logic required for a programming language" is absolutely incorrect.
You need to stop use this argument
And read about declarative case specific programming styles, and may be you will be able to win an argument

Thread Thread
 
beastful profile image
Ilya Afendin

It'd just unclear to me, why you can't just reply to what I really wrote.
Why you didn't mention imperative programming?
Why you didn't talk about html's features I described.

You just keep going like this: "basic logic should be in pl"
Please, you should understand that you tak about imperative programming.

You say that I redefine, reinterpret and etc.

But you really didn't my comments.
I never said that html is pl.
And I never said that it is.

I just tryna to say that your arguments not realy correct

Thread Thread
 
beastful profile image
Ilya Afendin

In computer science, declarative programming is a programming paradigm—a style of building the structure and elements of computer programs—that expresses the logic of a computation without describing its control flow.

In computer science, control flow (or flow of control) is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an imperative programming language from a declarative programming language.

Many languages that apply this style attempt to minimize or eliminate side effects by describing what the program must accomplish in terms of the problem domain, rather than describing how to accomplish it as a sequence of the programming language primitives2. This is in contrast with imperative programming, which implements algorithms in explicit steps.

Thread Thread
 
beastful profile image
Ilya Afendin

Source: wikipedia
Btw, on Russian wiki there is a line which says that html is a part of declarative programming paradigm
"defenition of declarative programming"

P.S.
English is not my native language, so sorry for some spelling mistakes

Thread Thread
 
beastful profile image
Ilya Afendin

I checked your posts, looks like you good at what you do. So, i have no idea why you write things like that:
"If you redefine a programming language to mean 'a language that doesn't need to allow expressing conditional logic', then you can say anything is a programming language. Emojis are a programming language because they instruct the computer to draw pictures.

The reality is that every programming language must have a way to express conditional logic based on criteria calculated at (its) runtime. This criterion classifies things like XSLT as programming languages (correctly) and HTML as not programming languages (also correctly)."

Now we don't talk about what html is. But abut what programming language actually is.
And the line: "...every programming language must have a way to express conditional logic based on criteria calculated at (its) runtime..." contradicts with the definition of declarative programming. Ans by the way, we cant call emoji a programming language because it does not have any control flow and it does not processes any data. Mean while html has (we just don't describe it) and also it has an ability to "process" data (i described it in one of my replies), this processing is just very domain specific.

For example regular expression is also can be called declarative "programming" language.
That is why:

  • we have an input (any string data)
  • it processes the string using different conditions (note, things you can do with string using regex are limited)
  • you get processed output

This pattern is also possible with html.

And also remember my position, i don't say that html is programming language, and i also don't say that html is not. I only say that it can be defined like this, based on ...(all my comments above)
i'm trying to stop people using wrong arguments, and being obsessed with their "precious" knowledge: "html is not pl, everyone knows it, what makes them to say the oposite "

Thread Thread
 
beastful profile image
Ilya Afendin

Explain how i reinterpreted your sourse?
it says the following: "
A programming language is a formal language that specifies a set of instructions that can be used to produce various kinds of output. Programming languages generally consist of instructions for a computer. Programming languages can be used to create programs that implement specific algorithms.
"
It exactly what pl is and it doesn't contradict with what i say.
This term also covers my sources. But its still just an introduction.

Thread Thread
 
beastful profile image
Ilya Afendin • Edited

"I'm glad we agree that it's a markup language. I.e. not a programming language." - it's one more thing you need to explain
That was not really polite from your side. You knew that i didn't mean it. I just gave one of html's definition.

So, was it an attempt to reinterpret my words?
(Notice how carefully i'm trying to define your actions, and everything else)

Thread Thread
 
yawaramin profile image
Yawar Amin • Edited

I told you that logic and conditions are only required for imperative programming
By defenition, it's just fact

Actually no, that's not a fact. Every programming language that falls under the non-imperative paradigm also has features for expressing conditional logic at runtime. Here's an example of a fundamentally pure programming language: mathematics: en.wikipedia.org/wiki/Indicator_fu...

Look at how that function is defined with two 'if' conditions. In other words, it is checking at 'runtime' (under some implementation of a runtime, e.g. a human brain) whether a number x is an element of a set A or not. I think you will agree that mathematics is not imperative programming. And yet here you see that even in mathematics we need to have a way of expressing conditional logic.

These are the basic ingredients you need for programming in any paradigm–functions and conditional logic. If a language doesn't have those, it's not a programming language.

Thread Thread
 
beastful profile image
Ilya Afendin

What do you mean by: "every non-imperative programming language also has features for expressing conditional logic"?

I gave you a defenition of both imperative and declarative programming, I discussed your Sourse.

Tell me is Wikipedia mistaking? Or I didn't find something in those defs?

Why you just say "every non-imperative..... alsa has ability to express a logic"

Where are proofs?
Describe the defenition of declarative of the declarative programming
And find a line where it should have conditions.

And also answer my arguments, I just described the abilities of html, that there ectualy is (very case specific) controll flow.

OK, agree with your math fact but it also does not contradict my statements

Look

In our discuss I described two things:
1 "abilities of html"

2 "the defenitions of DP"

In what ways 1st doesn't much the 2nd

Show me defenition where pl should have primitive logic.

For now you just throwing lines like:
"So I glad we agree that... "
"No that's not fact"
"that's only possible... "
"ur not right"
Etc.
It's a big disrespect
I think you should use something like that:
"this Defenition does not mach",
"I don't agree with...."

And also I don't argue with everything above but give me Sourse,
Sourse you gave before, is on my side

Thread Thread
 
beastful profile image
Ilya Afendin

For anyone else who read this

**
I don't support any side
**

Never give strict polarized defenitions (yes | no), because it 80% will be not correct.

I have no point, I just asked the person above a leading question, and gave a defenition which contradicts his words.

Instead of describing why this defenition (fits, or is wrong), it's just: "you redefine... "

Now for our dialogue:

I give you this:
en.wikipedia.org/wiki/Imperative_p...

And find me any line which supports your arguments.

Thread Thread
 
beastful profile image
Ilya Afendin

For everyone else who read this

"Programming languages can be used to create programs that implement specific algorithms."

It's just one of interpretations of pl:
engineering.cornell.edu/Programmin...

Thread Thread
 
beastful profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Ilya Afendin

And The thing I told about imperative programming is actually fact (answer to your disrespect)

I wrote this based on defs from wiki, copy them and show me the line where IT'S NOT A FACT, ALSO WHY DON'T YOU REPLY ON FACTS I GIVE YOU ABOUT HTML'S POSSIBILITEIS, AND THE FACT THAT IT'S "LOGIC" IS TOO HIGH LIVEL AND CASE-SPECIFIC, I EVEN DESCRIBED YOU WHY HTML IS NOT EMOGI, EVEN THOUGH I BROUGHT YOU DEFENITIONS WHERE NOTHING HAD BEEN SAID ABOUT RUNTIME AND CONDITIONS, INCLUDING YOUR SOURCE WHICH IS NOT EVEN AN ARTICLE

I CAN'T BE RIGHT IN THIS BECAUSE I HAVE NO POINT, I M TRYING TO SHOW YOU THAT YOUR ARGUMENTS SUCKS, IF YOU WANT TO PROVE THAT HTML IS NOT PROGRAMMING LANGUAGE STOP USING POLEMICS

Thread Thread
 
beastful profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Info Comment hidden by post author - thread only visible in this permalink
Ilya Afendin

I'tired of the fact that we just promote the post of the girl who is promoted by speaking out controversial topics.
Contact me on tg: t.me/web3dot1

The result of our discussion we will publish here

 
yawaramin profile image
Yawar Amin

I gave you a computer science source–you language lawyer it to fit your own definitions. I gave you an example that directly contradicted your claims, using mathematics–you ignore it and ask for proofs. OK, then let's dig deeper into computer science, where programming languages are actually studied:

Foundations of Computer Science, Prof. Anil Madhavapeddy: cl.cam.ac.uk/teaching/2223/FoundsCS/

Lecture 1, 'Introduction to Programming', p. 7:

Programming in-the-small concerns the writing of code to do simple, clearly defined tasks. Programs provide expressions for describing mathematical formulae and so forth. This was the original contribution of FORTRAN, the FORmula TRANslator. Commands describe how control should flow from one part of the program to the next.

What they are calling 'commands' or 'control flow' is what I am referring to as conditional logic. But wait, there's more!

Concepts of Programming Languages, Prof. Robert Sebesta: ime.usp.br/~alvaroma/ucsp/proglang...

Chapter 2, 'Evolution of Major Programming Languages', p. 48:

John McCarthy of MIT took a summer position at the IBM Information Research Department in 1958. His goal for the summer was to investigate symbolic computations...

In other words, programming.

...and to develop a set of requirements for doing such computations.

In other words, he was studying–what are the fundamental requirements of programming languages.

As a pilot example problem area, he chose differentiation of algebraic expressions. From this study came a list of language requirements. Among them were the control flow methods of mathematical functions: recursion and conditional expressions.

In other words, conditional expressions i.e. conditional logic at runtime. John McCarthy, the creator of Lisp, the first and only computer programming language which humans consider is 'discovered' rather than 'invented', because it is so fundamental in computer science.

Look, no matter how strongly you might think otherwise–and how much bold and capitalized text you put in internet comments–programming languages have actually been studied and well understood for decades, and they have certain basic requirements. Which you will find repeatedly in any programming languages textbook. And HTML is not a programming language. This, of course, does not detract from its immense value. It's just not what it is.

Some comments have been hidden by the post's author - find out more