FANDOM


A programming language (by jargon abbreviated PL) is a "human-writable" language composed of words, syntactic and semantic rules, in which a person, "programmer", composes texts, so called "program source codes". These texts, these "program source codes", are then fed into a specially designed program that translates them into a "machine language" that the computer is able to "execute", and thereby create dynamical effects that were designed by the programmer:

(provisional figure)
programmer
          \                      translation
           program source code --------------> machine language

The specially designed translation program traditionally goes under two categories:

  • Interpreter: that walks through the code of the program and translates code lines as it encounter them for immediate execution; once an interpreter has translated a line, the translation is dropped, and the interpreter continues to find source code, translate, execute and drop the translation, so the interpretation becomes somewhat slow;
  • Compiler: a compiler instead translates the whole program once and for all to a new machine code version unreadable for any sane human, this machine code version is executed in place of the source code, and it is running fast.

Interpreters are contraintuitively still used for two reasons: the source code generally occupies much less space than machine code, and interpreters are generally designed so that the programmer step-by-step easily can experiment, test and design functions functions interactively, while this is much more complicated for compilers, that generally require a higher degree of personal administration and discipline for the program development.

HistoryEdit

The following topics have been proposed for this stub section (feel free to expand it!):

  • before YYYY only machine language and assembly
  • FlowMatic --> COBOL (earliest PL)
  • FORTRAN --> Algol 58
  • Algol 60 --> imperative languages (most)
  • LISP --> functional languages
  • PROLOG --> logical languages''

Virtual machinesEdit

Main article: Virtual machine

As a compromise between compilers and interpreters

The machine code produced by a PL translator is very dependent on the computer architecture where it should run. Mac and PC, using vastly different central processor units, requires vastly different machine codes in order to execute the program correctly.

For the benefit of preserving space and having a program that runs on any computer architecture, various programming language providers have created so called virtual machines that execute specially designed "virtual machine codes" that are independent of the architecture. One can then imagine a fantasy computer architecture that doesn't actually exist, but which is "simulated" by many real existing computer architectures. For this to work the virtual machine needs to be implemented on the specific computer architecture as a software program, that one by one takes the instructions of the virtual machine and executes them. The benefit of this is that the virtual machine code program runs somewhat faster than a counterparting machine code, that it occupies slightly less space than this counterparting code, but foremost that it can run on every computer architecture. In this category we have:

Programming language typesEdit

The following topics have been proposed for this stub section (feel free to expand it!):

  • the PL:s are generally "trans-paradigmal", partially realising more than one type characteristic

Imperative/Object Oriented groupEdit

The following topics have been proposed for this stub section (feel free to expand it!):

  • lexical var. scope and var. manipulation
  • statement sequence regulation, value/structure dichotomy
  • data protection, data structures and objects with inheritance
  • complex stack/heap issues

Functional groupEdit

The following topics have been proposed for this stub section (feel free to expand it!):

  • function calls only
  • no determined order of function calls
  • a naming mechanism to replace variables
  • no side effects, full functional monotony
  • tail recursion to realise infinite loops
  • in practice funcPLs tend towards IOO group (LISPs) or Logical group (Erlang)

Logical groupEdit

The following topics have been proposed for this stub section (feel free to expand it!):

  • PROLOG, PARLOG(?), Mercury, ...

ScriptingEdit

The following topics have been proposed for this stub section (feel free to expand it!):

  • BASIC, awk, sh, bash, csh, ksh, Python, Ruby, ...

OtherEdit

The following topics have been proposed for this stub section (feel free to expand it!):

  • FORTH (programmable virtual assembly, aka. RPN), PostScript (non-programmable RPN), APL (vector/matrix based scripting), A+ (vector/matrix based functional)

See alsoEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.