Weak typing


programming
Strict enforcement of type rules but with well-defined exceptions or an explicit type-violation mechanism.
Weak typing is “friendlier” to the programmer than strong typing, but catches fewer errors at compile time.
C and C++ are weakly typed, as they automatically coerce many types e.g. ints and floats. E.g.
int a = 5; float b = a;
They also allow ignore typedefs for the purposes of type comparison; for example the following is allowed, which would probably be disallowed in a strongly typed language:
typedef int Date; /* Type to represent a date */ Date a = 12345; int b = a; /* What does the coder intend? */
C++ is stricter than C in its handling of enumerated types:
enum animal CAT=0,DOG=2,ANT=3; enum animal a = CAT; /* NB The enum is optional in C++ */ enum animal b = 1; /* This is a warning or error in C++ */
(2000-07-04)

Read Also:

  • Weak-willed

    adjective 1. having or showing a want of firmness of will; easily swayed. adjective 1. lacking strength of will

  • Weal

    noun 1. well-being, prosperity, or happiness: the public weal; weal and woe. 2. Obsolete. wealth or riches. 3. Obsolete. the body politic; the state. noun 1. wheal. noun 1. a raised mark on the surface of the body produced by a blow Also called wale, welt, wheal noun 1. (archaic) prosperity or wellbeing (now esp […]

  • Weald

    noun 1. wooded or uncultivated country. noun 1. The, a region in SE England, in Kent, Surrey, and Essex counties: once a forest area; now an agricultural region. noun 1. (Brit, archaic) open or forested country noun 1. the Weald, a region of SE England, in Kent, Surrey, and East and West Sussex between the […]

  • Weals

    noun 1. well-being, prosperity, or happiness: the public weal; weal and woe. 2. Obsolete. wealth or riches. 3. Obsolete. the body politic; the state. noun 1. wheal. noun 1. a raised mark on the surface of the body produced by a blow Also called wale, welt, wheal noun 1. (archaic) prosperity or wellbeing (now esp […]

  • Wealth

    noun 1. a great quantity or store of money, valuable possessions, property, or other riches: the wealth of a city. 2. an abundance or profusion of anything; plentiful amount: a wealth of imagery. 3. Economics. all things that have a monetary or exchange value. anything that has utility and is capable of being appropriated or […]


Disclaimer: Weak typing definition / meaning should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. All content on this website is for informational purposes only.