What is Type: Definition and 952 Discussions

In programming languages, a type system is a logical system comprising a set of rules that assigns a property called a type to the various constructs of a computer program, such as variables, expressions, functions or modules. These types formalize and enforce the otherwise implicit categories the programmer uses for algebraic data types, data structures, or other components (e.g. "string", "array of float", "function returning boolean"). The main purpose of a type system is to reduce possibilities for bugs in computer programs by defining interfaces between different parts of a computer program, and then checking that the parts have been connected in a consistent way. This checking can happen statically (at compile time), dynamically (at run time), or as a combination of both. Type systems have other purposes as well, such as expressing business rules, enabling certain compiler optimizations, allowing for multiple dispatch, providing a form of documentation, etc.
A type system associates a type with each computed value and, by examining the flow of these values, attempts to ensure or prove that no type errors can occur. The given type system in question determines what constitutes a type error, but in general, the aim is to prevent operations expecting a certain kind of value from being used with values for which that operation does not make sense (logic errors). Type systems are often specified as part of programming languages and built into interpreters and compilers, although the type system of a language can be extended by optional tools that perform added checks using the language's original type syntax and grammar.

View More On Wikipedia.org
  1. K

    Help The Density Force Area type problem.?

    Homework Statement On the afternoon of January 15, 1919, an unusually warm day in Boston, a 27.4-m-high, 27.4-m-diameter cylindrical metal tank used for storing molasses ruptured. Molasses flooded into the streets in a -9m-deep stream, killing pedestrians and horses, and knocking down...
  2. A

    What type of motor for an electric scooter?

    What type of motor for an electric scooter!? Im trying to build an electric scooter for my physics for engineers class. I'm having trouble decidin on using AC or DC motors it needs to be battery powered. does anyone have advice?
  3. hxtasy

    Can a Wiki-Type GPS Library Improve Navigation Accuracy?

    a wiki type GPS library ? Pretty much everyone has a GPS navigation system now, whether it be in their cell phone or in their car. with all the new houses being built and new highways a lot of times you find yourself in the middle of a field according to the gps because that new road has not...
  4. N

    What Type of Energy is Associated with Object-Environment Interaction?

    What type of energy is associted with an object's interaction with the environment? Is it potential, kinetic, nonmechanical, or mechanical?
  5. N

    Is an electron a type of electromagnetic wave?

    In certain circumstances, when an electron collides with an anti-electron, the interaction produces two gamma photons. The reverse process would be a gamma photon colliding with a gamma photon, such that the interaction produces an electron and anti-electron. A gamma photon is a high...
  6. G

    What Distinguishes Thai Cuisine in Flavor Complexity?

    I'd say Thai food. No other cuisine that I have come across has as many types of different ingredients, foods, and entrees as Thai food. No other cuisine masters the flavors of sweet, spicy, sour, and salty like Thai food.I'd say mexican is a very close 2nd. God I love carnitas.
  7. T

    What type of Accelrator is the LHC?

    Homework Statement I am writing about Particle Accelerators Homework Equations N/A The Attempt at a Solution I am writing an essay on particle accelerators, and I am trying to find out what type of accelerator the LHC actually is, but I cannot find anywhere that actually says...
  8. B

    Can TeX be directly typed into Word using MathType 6.5 for Windows?

    Many of you have gotten comfortable with TeX/LaTeX as a result of this forum, so I wanted to let you know that with MathType 6.5 for Windows (released yesterday), you can now type TeX directly into Word and change the code into a MathType equation either by clicking a toolbar icon, or with the...
  9. L

    How Can I Type and Format Index Cards in Microsoft Word?

    Hey guys, Sorry i coudln't find an appropriate forum for this topic, but I need to make index cards for some vocab words. It is much easier/quicker/neater if i were to type them on paper then cut them out like index cards. I only have the new word, i think its microsoft word 2008, and i can't...
  10. B

    I can't remember what type of differential equation this is or how to solve it

    Homework Statement I have a differential equation of the form: dA/dx = ab + kA and I need to solve it Homework Equations The Attempt at a Solution I've started it by moving the right hand side of the equation to the bottom of the left hand side and the bottom of the left to...
  11. W

    Quick Linear Algebra-True or false type

    Quick Linear Algebra---True or false type Homework Statement If A is a m*n matrix and B is a n*n matrix, does nullity AB= nullity A* nullity B? I think that it does, but I am not sure. I don't need a proof of this or anything, this is just a fact I need to know in order to try and prove...
  12. P

    Is Computer Science the Right Path for Me?

    I don't know if I'm the "engineering type." I enjoyed building Legos from childhood, but I've never really shown any interest in exploring how mechanical things work or building things; I've never been one to take the radio apart, for instance, to see how it works, or taken interest in designing...
  13. S

    Constructing General Solution for Abel Second Type ODE from Particular Solutions

    I have Abel equation of second type. I've found one particular solution for sure, maybe two. Is it possible to construct the general solution from those with integration or whatever? I know that is possible for Ricatti ODE and since Ricatti is particular case of Abel, I was wondering if...
  14. M

    Question about unknown type of metal ion

    Homework Statement we are mixing CuSo4 (Cu2+) with an iron (Fe) powder and we are trying to determine whether Fe2+ forms or Fe3+ now the question is : suppose that 1.0 g of iron is used in the experiment. what is the minimum volume of Cu2+ solution that must be added in order to completely...
  15. S

    More general solutions of Abel ODE, second type ?

    more general solutions of Abel ODE, second type ?? Is there any progress in solving Abel ODE of second type: (y(x)+g(x)) y'(x) = f2(x) y(x)^2+f1(x) y(x)+f0(x) where the unknown function is y(x) and the other functions are coefficient functions. In the case I am trying to solve...
  16. H

    Hi I with a displacement type problem

    Homework Statement In a mall, a shopper rides up an escalator between floors. At the top of the escalator, the shopper turns right and walks 9 meters to a store. The magnitude of the shopper's displacement from the bottom of the escalator is 16m. The vertical distance between the floors is 6m...
  17. E

    Type of microphone for capturing acoustic emissions

    I am currently trying to incorporate the sensing of tool wear as part of my research, which is an investigation into an experimental manufacturing process that is probably most similar to milling. I have already been making use of force data, but would like to utilize acoustic data as well...
  18. DrChinese

    PDC Type I: Unreasonable "Elements of Reality" in Bell Tests?

    EPR defined a form of realism which later figured in Bell's Theorem. If the outcome of a particle's observation could be predicted with certainty, then the observable had an "element of reality". In Bell tests, that is usually given as photon polarization. We see the so-called "perfect"...
  19. N

    Cathode Ray Type Question - Electron being moved by horizontal plates

    Homework Statement An electron is accelerated horizontally from rest in a television picture tube by a potential difference of 5710 V. It then passes between two horizontal plates 6.45 cm long and 1.24 cm apart that have a potential difference of 249 V (see figure below). At what angle q...
  20. W

    Eimac Type 8533 Planar Triode Connections?

    Hello All! Can anyone identify the filament, cathode, grid, and anode (plate) connections of a Eimac type 8533 planar triode tube? I need to maufacture a custom fixture/holder to power this tube and the connections are apparently to the actual metal/ceramic housing of the tube. I have...
  21. J

    What is the best type of guard to put on a candle to protect it from the wind?

    To stop it from blowing out. Should you just have a 2 inch plastic around where the flame is?
  22. B

    MATLAB Matlab- input arguments of type 'double' ?

    Matlab- input arguments of type 'double' ? Hi there, I was wondering if anyone could help me. Yesterday I wrote the command [z,r]=ode45(@rad03,[0,10],0); and it worked but today I am writing exactly the same thing but keep getting the message: ?Error using ==>feval Undefined function or...
  23. S

    Elements and similar type of reaction

    Potassium reacts with Chlorine to produce the ionic solid potassium chloride (KCl). Which elements would you predict would react with Iodine in a similar type of reaction? I know that K has a +1 charge and Cl has a -1 charge. Iodine has a -1 charge and all the elements in column 1A have a...
  24. S

    Hese type of preserved bodies started being discovered

    <crackpot link removed> So what's up with them?
  25. Barnak

    Number of galaxies by type, today

    I'm looking for reliable informations about the % numbers of galaxies in the whole visible universe, by Hubble type (S, SB, S0, E, Irr), for a T0 time slice (i.e. today). Of course, looking far away into space means we're also looking far away into the past, so distant galactic populations (by...
  26. D

    Exploring Alternatives to RoHS Restricted Substances in Electronic Components

    Restriction of Hazardous Substances Directive... As most of you know, there is a list of restricted hazards which are to be avoided when possible during manufacturing, designing, etc... The list for the ROHS via a recent search through wikipedia.org list the following: 1. Lead 2. Mercury...
  27. F

    How Do You Solve Linear Differential Equations with an Integrating Factor?

    methord to use? find the solution of the initial value problem y'+(3/x)y=e2x/x3 y(1)=1
  28. C

    What should we call the type of dervative that isn't a partial derivative?

    For example, let f and g be defined as f=x^2 g=2xy I would say that the partial derivative of g with respect to y equals the perfect derivative of f(x). I've never been convinced that this is standard (or even correct) terminology. I am curious what some of you would use in place of perfect...
  29. E

    Induction on P(x) for x = m to n

    What do you call this type of induction (if it even exists): Let P(x) be some statement concerning the integer x. If - P(m) is true, and - P(k) is true implies P(k + 1) is true, where m ≤ k < n, then P(x) is true for all integers x = m, ..., n.
  30. S

    Can any type light bulb be powered by gas?

    Can a halogen light bulb be powered by gas, or can a halogen light bulb only be powered by electricity? Can an incandescent light bulb be powered by gas, or can an incandescent light bulb only be powered by electricity?
  31. H

    Different Type of Extension Problem for Groups

    Let H, K be finite groups. Instead of asking what groups G there are such that K can be embedded as a normal subroup and G/K is isomorphic with H (the usual extension problem for groups), I've been thinking about the following: Which groups G exist such that H and K can be embedded as (not...
  32. C

    Discover Your Personality Type: Take the Quiz!

    I making a personality quiz that goes like the following. User takes a test to determine which type of person they are more like. So there will be say 5 types, each given a percentage of 100 that they are closest to at quiz end. The test has 50 questions, plus a age question and a sex...
  33. A

    Three Critical Points and Type of Local Phaseportrait

    Homework Statement y1'= −4*y1+y2+y1*y2 y2'= −2*y1−y2+y1*y1 Determine the three critical points of the system and their type of local phase portrait (stable node, unstable, saddle point, spiral, center, no node) Hence I need to get three critical points (x1,y1), (x2,y2) & (x3,y3) and their...
  34. H

    Venture capital/entrepreneurship type volunteering organizations?

    Hi Is anyone aware of some interesting engineering/math/science or venture capital/entrepreneurship type volunteering organizations? I'm looking into volunteering online if I can. Thanks
  35. X

    MATLAB Data type conversion in matlab

    I'm writing a program in matlab. I have a matrix whose entries are all ones and zeros. I want to convert each row vector of the matrix into a binary number whose digits are the entries of the vector. So for example if an arbitrary row of the matrix was [1, 0, 1, 1], I would like to convert it...
  36. J

    Which engineering major is the best fit for me?

    Okay, I am a freshman in college, and I was on the course of environmental engineering. After some thinking, I realized that this wasnt for me because I was always interested in alternative energy like solar, wind, nuclear, and all that stuff, and I also like stuff like transportation systems...
  37. I

    Uses of type I superconductors

    Does anyone know of any practical uses for a type I superconductor, where it isn't possible to use a type II (which typically have higher critical temperatures so need less cooling etc)?
  38. G

    What Type of Engineer is Right for Me?

    I am considering foing into the engineering field, but I am not sure which type. I don't want to spend the rest of my life in front of a computer, I enjoy hands on work, being in the field, meeting new people, conceptual stuff, ect. From that, can anyone suggest which engineering field...
  39. H

    Schools Type of Grad School I Can Get Into?

    Hi all, I'm curious to see what graduate schools you think I may be able get into for a MSEE. Brief overview of myself: Electrical Engineering major, 20 years old, male College Senior at a State School (Public) - Ranked around 60th in traditional college rankings... graduation date: May 09...
  40. marcus

    Congrats to Turbo on A Catalogue of M51 type Galaxy Associations

    Congrats to Turbo on "A Catalogue of M51 type Galaxy Associations" Turbo writes: It has been a bit over two years now, but our paper has been accepted at Astrophysics and Space Sciences (a peer-reviewed journal published by Springer) and the preprint is on arXiv...
  41. M

    When does the Frullani type integral hold equality?

    under what condition the does the equality hold ? \int_{0}^{\infty} dt \frac{ f(at)-f(bt)}{g(t)}= (G(b)-G(a))(f(0)-f(\infty)) and \int dt g(t)
  42. G

    What type of wave is exhibited by amber waves of grain ?

    What type of wave is exhibited by "amber waves of grain"? Homework Statement What type of wave is exhibited by "amber waves of grain"/ Homework Equations Transverse waves move particles in a direction perpendicular to the direction of the wave. Longitudinal waves move particles in...
  43. M

    C/C++ C++: How is the data type 'string' defined?

    I read somewhere that 'string' is basically a class having certain functions. I looked into string.h and _mingw.h but could not find its defintion. Can anyone guide me as to where to look, or give me an idea of how it may be defined? Warm regards Mr V
  44. A

    Cantilever beam: Loading type?

    Hello, I am modeling a Cantilever beam and there will be no loading except an excitation at the calmped end. Should I describe it as uniformally loaded or purely free? am confused :S
  45. O

    Transformer Voltage Multiplication Factor Calculation

    The output voltage of a 74 W transformer is 13 V, and the input current is 34 A. By what factor is the voltage multiplied? V_{s} ------=? V_{P} Honestly I am not sure exactly where to start in solving this problem.
  46. L

    Medical school type of question

    well, I've been going to community college for like three years as a part time student and yet I have not received any advice from any of the councillors there. so I was wondering what are the steps that i have to follow to get into medical school and which is better studying in the USA or...
  47. S

    Electric vehical motor type help

    i want to make an electric vehical, problem is i can't decide on a proper motor. the vehical can weigh upto 300kgs so what sort of motor do i need to propel it at decent speeds. i can use a gearbox attached to the motor so the torque part can be solved to some extent. can u people send me...
  48. U

    EE Job Question - Semiconductor Type Stuff

    http://careers.peopleclick.com/jobposts/Client40_GLDTR/BU1/External/139-27001.htm?ShowReturn=Yes Can someone in the EE or semiconductor field specifically give me more insight into this job position? It's for an internship type job and I was picked to interview for it. Is this something...
Back
Top