Site Tools


softwaredevelopment:typing

Typing

Three area's/axis of differences:

  1. Static vs dynamic typing (compiled vs interperated)
  2. Manifested vs Infered
  3. Nominal vs Structural (identified by name vs structure)

strong vs weak typing (are not clearly defined terms)

manifested: types are all explicitly defined by the programmer infered: compiler figures out the type of data infered from the value assigned to the variable.

nominal: identified by name, for instance class Car is defined Car type by the name. structural: determine the type by looking at the data. (think of interfaces different classes can implement the same interface. However in structural typeing you dont have to explicitly define that classes implement the inteface it gets inferred. ) types get checked at compile time

duck typing/latent typing, Similar to structural typing. Like if it looks, quacks and moves like a duck, its probably a duck. So this type checks if certain properties are present. Types associated with the data/values. types checked at runtime.

softwaredevelopment/typing.txt · Last modified: by Niels