Programming Languages Concepts

From NovaOrdis Knowledge Base
Revision as of 18:25, 12 April 2016 by Ovidiu (talk | contribs) (→‎Type)
Jump to navigation Jump to search

Typing

Type

A type determines the set of values and operations specific to values of that type, and the way the instances of the type are stored in memory - the size of the values.

Static Typing vs Dynamic Typing

For a statically typed system, the variables always have a specific type, and that type cannot be changed.

Dynamically typed languages are convenient, because there are no intermediate steps between writing the code and executing it. However certain types of errors cannot be caught until the program executes. For statically typed languages, many of these errors are caught at the compilation phase. On the downside, static languages usually comes with a great deal of ceremony around everything that happens in the program (heavy syntax, type annotations, complex type hierarchies).

Strong Typing vs Loose Typing

Type Systems

The Go Type System
The JavaScript Type System

Duck Typing

Metaprogramming

Metaprogramming is writing code that manipulates other code, or even itself.

Functional Programming

Closures and recursion are at the base of the functional programming paradigm.

Closures