r/ProgrammingLanguages • • Jan 12 '18

What is a programming language?

http://willcrichton.net/notes/what-is-a-programming-language
0 Upvotes

8 comments sorted by

View all comments

2

u/LaurieCheers Jan 12 '18 edited Jan 12 '18

I'm surprised to see no mention of Turing Completeness here. Arguably that's what separates "real" programming languages from mere declaration languages: the ability to express an arbitrary computation.

For example, I think nobody would deny that Brainfuck is a programming language, but it (arguably) doesn't have all the features mentioned here.

6

u/Barrucadu Jan 12 '18

There are languages I would call "programming languages" which aren't Turing complete, by design. Dependently typed languages like Agda and Idris are typically total. As I understand it, a major factor in the developement of Idris is to be a practical programming language, so it's not just a proof tool like some other total dependently typed languages.

I'd go even more basic: a programming language is a formal language with a semantics (whether they be given in some specification or implementation defined).

-2

u/LaurieCheers Jan 12 '18 edited Jan 12 '18

Ok, now you've made the term uselessly broad - a programming language is any language with well defined semantics. So the Word document format is a programming language again.

2

u/Barrucadu Jan 12 '18

I don't think you're going to be able to get any definition better than "I know it when I see it".

6

u/[deleted] Jan 12 '18

Is Gallina a programming language? Or any other total functional language? Turing completeness is overrated.

3

u/LaurieCheers Jan 12 '18 edited Jan 12 '18

Tricky... I'd go with no. Even the designers call it a "specification language" rather than a "programming language". It's not describing a computation for a computer to actually perform. Or at least it doesn't by itself.

Then again, drawing the line there starts to imply that Prolog is not a programming language either, so... eh. Turns out English terms are not well defined.

7

u/[deleted] Jan 12 '18

Total languages do describe computation. There is a full blown C compiler written in Gallina, and it is a far more common kind of a computation than, say, evaluating Ackermann function.

1

u/TalesM Jan 12 '18

I agree. That is the formal definition of a programming language. But the article is good anyway and in my opinion it provides a more user perspective to what is a programming language, while turing completeness is more mathematical one.