Programming Language
- In Turkish
- Programlama Dili
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
# 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
- CompilerProgramming Fundamentals, p. 11A compiler is a program that translates source code written in a programming language into a lower-level form, such as machine code, that a computer can run.
- InterpreterProgramming Fundamentals, p. 30An interpreter is a program that runs source code directly, step by step, instead of first translating the whole program into a separate executable file.
- PythonProgramming Languages, p. 26Python is a general-purpose, dynamically typed programming language known for readable syntax and wide use in data science, automation, and web backends.
- JavaScriptWeb Development, p. 24JavaScript is the programming language that runs in web browsers to make pages interactive, and it also runs on servers through runtimes like Node.js.
- JavaProgramming Languages, p. 15Java is a statically typed, object-oriented programming language that compiles to bytecode for the Java Virtual Machine, so programs run on many platforms.
- CProgramming Languages, p. 3C is a compiled, low-level programming language that gives direct control over memory and is used to build operating systems, drivers, and embedded software.
- Static TypingProgramming Fundamentals, p. 53Static typing means the types of variables and expressions are checked before the program runs, usually by the compiler, so many type errors are caught early.
- Dynamic TypingProgramming Fundamentals, p. 16Dynamic typing means types belong to values, not variables, and are checked while the program runs, so a variable can hold a number now and a string later.
Spotted a mistake or something missing on this page?Suggest an edit