A linear type system is similar to C++'s auto_ptr class, which behaves like a pointer but is invalidated by being set to null after use in an assignment. However, the linearity constraint can be checked at compile time, whereas auto_ptr can only raise exceptions at run time if it is misused.
This example uses C++-like notation, but shows a language with a linear type system (which therefore is not C++).
Dog* d = new Dog(name="Fido" ); // creates a reference to a new object
Dog* p = d; // uses d to create a reference to the same object: this forces d out of scope
print p->getName(); // output "Fido"
print d->getName(); // COMPILE-TIME ERROR: d was forced out of scope by its use above and is not a valid variable here
Heritabilities and Genetic Correlations of Body Condition Score and Calving Interval with Yield, Somatic Cell Score, and Linear Type Traits in Brown Swiss Cattle
Dec 01, 2007; ABSTRACT This study aimed to estimate genetic parameters for body condition score (BCS), calving interval (CI), somatic cell...
US Patent Issued to Samsung Electro-Mechanics on May 21 for "Linear Type Vibration Motor Having Magnet Casing" (South Korean Inventors)
May 21, 2013; ALEXANDRIA, Va., May 21 -- United States Patent no. 8,446,055, issued on May 21, was assigned to Samsung Electro-Mechanics Co....
Genetic parameters and responses of linear type, yield traits, and somatic cell scores to divergent selection for predicted transmitting ability for type in Holsteins
Jun 01, 2002; ABSTRACT The objective was to examine the direct and correlated responses of linear type, yield traits, and somatic cell scores...