Questions tagged [programming-languages]

A programming language is an artificial language designed to express computations that can be performed by a machine. **Please note:** As is the case elsewhere on Stack Overflow, resource and tutorial recommendation requests, requests for lists of things ("which languages have this feature..."), and excessively opinion-based ("what's the best...") questions are off topic.

In the 1950s E. Dykstra stated that:

We can call something a programming language if it does three things: execute sequential statements, make decisions and allow looping or iteration.

A programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer.

This tag is particularly suitable for questions about programming languages and programming language design in general.

A programming language is a notation for writing programs, which are specifications of a computation or algorithm.

A popular weblog dedicated to programming languages design is Lambda the Ultimate.

Programming language description wikipedia

For a discussion on the use of the tag see here.

4117 questions
229
votes
11 answers

Best explanation for languages without null

Every so often when programmers are complaining about null errors/exceptions someone asks what we do without null. I have some basic idea of the coolness of option types, but I don't have the knowledge or languages skill to best express it. What is…
216
votes
8 answers

Is SQL or even TSQL Turing Complete?

This came up at the office today. I have no plans of doing such a thing, but theoretically could you write a compiler in SQL? At first glance it appears to me to be turing complete, though extremely cumbersome for many classes of problems. If it…
Matthew Vines
  • 27,253
  • 7
  • 76
  • 97
216
votes
32 answers

Why aren't programs written in Assembly more often?

It seems to be a mainstream opinion that assembly programming takes longer and is more difficult to program in than a higher level language such as C. Therefore it seems to be recommend or assumed that it is better to write in a higher level…
mudgen
  • 7,213
  • 11
  • 46
  • 46
212
votes
9 answers

The term "Context" in programming?

I have been programming for some months now and a frequently used word is "context" in classes. Like ServletContext (Java), Activity (Android), Service (Java, Android), NSManagedContext (Objective-C, iOS). By looking in dictionaries I see that the…
user772058
  • 2,131
  • 2
  • 13
  • 6
207
votes
9 answers

Dynamic type languages versus static type languages

What are the advantages and limitations of dynamic type languages compared to static type languages? See also: whats with the love of dynamic languages (a far more argumentative thread...)
cvs
  • 3,041
  • 8
  • 26
  • 22
197
votes
22 answers

What is the difference between Type and Class?

What makes a type different from class and vice versa? (In the general language-agnostic sense)
yesraaj
  • 46,370
  • 69
  • 194
  • 251
193
votes
10 answers

What is the difference between syntax and semantics in programming languages?

What is the difference between syntax and semantics in programming languages (like C, C++)?
haccks
  • 104,019
  • 25
  • 176
  • 264
193
votes
18 answers

What is declarative programming?

I keep hearing this term tossed around in several different contexts. What is it?
Brian G
  • 53,704
  • 58
  • 125
  • 140
185
votes
8 answers

Scalar vs. primitive data type - are they the same thing?

In various articles I have read, there are sometimes references to primitive data types and sometimes there are references to scalars. My understanding of each is that they are data types of something simple like an int, boolean, char, etc. Is there…
181
votes
9 answers

Seeking clarification on apparent contradictions regarding weakly typed languages

I think I understand strong typing, but every time I look for examples for what is weak typing I end up finding examples of programming languages that simply coerce/convert types automatically. For instance, in this article named Typing: Strong vs.…
Edwin Dalorzo
  • 76,803
  • 25
  • 144
  • 205
172
votes
24 answers

What are important languages to learn to understand different approaches and concepts?

When all you have is a pair of bolt cutters and a bottle of vodka, everything looks like the lock on the door of Wolf Blitzer's boathouse. (Replace that with a hammer and a nail if you don't read xkcd) I currently program Clojure, Python, Java and…
Pepijn
  • 4,145
  • 5
  • 36
  • 64
163
votes
24 answers

Why can't variable names start with numbers?

I was working with a new C++ developer a while back when he asked the question: "Why can't variable names start with numbers?" I couldn't come up with an answer except that some numbers can have text in them (123456L, 123456U) and that wouldn't be…
148
votes
11 answers

What is the difference between mutex and critical section?

Please explain from Linux, Windows perspectives? I am programming in C#, would these two terms make a difference. Please post as much as you can, with examples and such.... Thanks
ultraman
140
votes
4 answers

What languages can be compiled to WebAssembly (Wasm)?

What languages can be compiled to WebAssembly (Wasm)? I believe right now C, C++, and Rust (experimental) can be compiled to WebAssembly, with the llvm compiler backend, with languages like Java, Swift, and C# not currently being supported, but…
Jordan Stewart
  • 3,187
  • 3
  • 25
  • 37
133
votes
17 answers

Detecting programming language from a snippet

What would be the best way to detect what programming language is used in a snippet of code?
João Matos
  • 1,515
  • 2
  • 11
  • 11