wiki:Buzzwords/TypeSafety

Type Safety

There is no safety, just types.

A type is an annotation for a given value. Logically it is a tag attached to a value, which is associated by its name to a well-defined set of properties we call Abstract Data Type or ADT.

A type is defined by a set of possible operations on its valies.

A type could be defined as a Abstract Data Type (a named Interface or a Protocol) or by a Class or a Trait.

A Class is a way to define a structure which combines data and code and abstract it as a type. Class with only methods which define an Interface is called an Abstract Class. Its name is the type-tag for a value.

A value could belong to more than one type (has multiple Traits)

Last modified 3 years ago Last modified on Sep 9, 2016, 9:23:38 AM
Note: See TracWiki for help on using the wiki.