Skip to main content

Programming Language

Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/programming-language

In short

A programming language is a formal language with exact rules for writing instructions a computer can carry out, such as Python, JavaScript, Java or C.

What is a programming language?

A programming language gives people a precise way to tell a computer what to do. Its syntax defines how code must be written, and its semantics define what each piece of code means when it runs. Because the rules are exact, the same program behaves the same way every time, unlike a request written in everyday language.

Computers only run machine code, so programs are translated first. A compiler translates the whole program ahead of time, as with C, Go and Rust; an interpreter runs it statement by statement, as with Python and Ruby; and languages such as Java and C# compile to bytecode, which a virtual machine then runs, often compiling the busiest parts just in time.

Languages differ in level, typing and style. Low-level languages such as C give close control over memory and hardware, while high-level languages such as Python handle those details for you. Some check types before the program runs (static typing) and others while it runs (dynamic typing), and they favor different styles, such as object-oriented or functional programming.

Key takeaways

  • A programming language has exact rules (syntax) and meanings (semantics) for writing instructions.
  • Programs are compiled, interpreted, or compiled to bytecode for a virtual machine.
  • Languages range from low level, close to the hardware, to high level.
  • Each language suits some jobs better than others; none is best at everything.

Example

A small program in Pythonpython
# Greet each name in a list
names = ["Ada", "Linus", "Grace"]
for name in names:
    print(f"Hello, {name}!")

Readers ask

Which programming language should I learn first?

For most beginners Python or JavaScript is a good first choice: Python reads almost like English, and JavaScript runs in every browser. What matters more is learning the ideas, such as variables, loops, functions and debugging, which carry over to every other language.

Is HTML a programming language?

No. HTML is a markup language: it describes the structure of a page, such as headings and links, but has no variables, conditions or loops to express logic. CSS is a style sheet language, and web pages get their logic from JavaScript.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings