FACTOID # 153: In all the countries surveyed, women do more housework than men.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Weak typing

In computing, weak typing, when applied to a programming language, is used to describe how the language handles datatypes. "Weak Typing" is the strict enforcement of type rules but with well-defined exceptions or an explicit type-violation mechanism. Originally, the word computing was synonymous with counting and calculating, and a computer was a person who computes. ... A programming language or computer language is a standardized communication technique for expressing instructions to a computer. ... In computer science, a datatype (often simply type) is a name or label for a set of values and some operations which can be performed on that set of values. ...


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. In computing, strongly-typed, when applied to a programming language, is used to describe how the language handles datatypes. ... The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language is a standardized programming language developed in the early 1970s by Ken Thompson and Dennis Ritchie for use on the UNIX operating... C++ (pronounced see plus plus) is a general-purpose computer programming language. ...

 int a = 5; float b = a; //exchanging values :) 

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 */ /* Priya used this... :) */ 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++ */ 

  Results from FactBites:
 
Datatype - Wikipedia, the free encyclopedia (2464 words)
Types are usually associated either with values in memory or with objects such as variables.
For example, a datatype is a type of a value, a class is a type of an object and a kind is a type of a type.
Duck typing is a humorous way of describing the (dynamic) typing typical of many scripting languages which guess the type of a value.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.