less_retarded_wiki/programming_language.md
2023-07-05 15:15:51 +02:00

4.9 KiB

Programming Language

Programming language is an artificial language created so that humans can relatively easily communicate algorithms to computers. Such language often tries to mimic human language (practically always English) but is much MUCH simpler so that a computer can actually analyze it and understand it precisely so it also partially looks like math expressions. A programming language can be seen as a middle ground between pure machine code (very hard to handle by humans) and natural language (very hard to handle by computers).

For beginners: a programming language is actually much easier to learn than a foreign language, it will typically have fewer than 100 "words" to learn (out of which you'll mostly use like 10) and once you know one programming language, learning another becomes a breeze because they're all (usually) pretty similar in basic concepts. The hard part may be learning some of the concepts.

A programming language is distinct from a general computer language by its purpose to express algorithms and be used for creation of programs. There are computer languages that are NOT programming languages (at least in the narrower sense), such as HTML, json and so on.

We divide programming languages into different groups. Perhaps the most common divisions is to two groups:

  • compiled languages: Meant to be transformed by a compiler to a native (directly executable) binary program. These languages are more efficient but usually more difficult to program in, less flexible and the compiled programs are non-portable (can't just be copy-pasted to another computer with different architecture and expected to run). These languages are usually lower level, use static and strong typing and manual memory management. Examples: C, C++, go, rust, Haskell or Pascal.
  • interpreted languages: Meant to be interpreted by an interpreter "on-the-go". Basically to run the program you need the interpreter of the language installed on your computer and this interpreter reads the source code as it is written and performs what it dictates. These languages are generally less efficient (slower, use more RAM) but also more flexible, easier to program in and independent of platforms. These languages usually higher-level, use weak and dynamic typing and automatic memory management (garbage collection). Examples: Python, Perl, JavaScript and BASH.

Sometimes the distinction here may not be completely clear, for example Python is normally considered an interpreted language but it can also be compiled into bytecode and even native code. Java is considered more of a compiled language but it doesn't compile to native code (it compiles to bytecode). C is traditionally a compiled language but there also exist C interpreters etc.

We can divide language in many more ways, for example based on their paradigm (impertaive, declarative, object-oriented, functional, logical, ...), purpose (general purpose, special purpose), computational power (turing complete or weaker), level of abstraction (high, low), typing (strong, weak, dynamic, static) or function evaluation (strict, lazy).

Nice Languages

{ THIS IS NOT A COMPREHENSIVE LIST, I can only include languages that I am familiar with, please add more ~drummyfish }

See Also