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. T

    Do you consider organized religon to be a type of Brainwashing?

    I have relatives who are mormon... which drives me insane. I am atheist... but am generally accepting of other people's beliefs, although always ready to argue with someone if they want to. However my cousin is sent away to some sort of religous facilitiy for one year where she is complelty cut...
  2. phoenixthoth

    Online resource for type theory?

    Does anyone know a good online resource for type theory? I've heard that in it, there is a "universal object" which "contains" all other "objects." Is this right? Where can I get the good stuff? I know I can google for it; I'm not a moron. I just want your recommendations instead of a list...
  3. K

    Pointless - Type your name with your elbows

    kingftn otyhjionhjgt
  4. S

    How Does Capacitance Affect Charge Storage in Series Capacitors?

    This question relates on the capacitance and the charge stored in each capacitor. I have my question and diagram in the attachment.Hope that anyone will help me figure out.
  5. N

    Which type of rains are most powerful?

    which type of rains are most powerful?
  6. C

    What Type of Finite or Infinite Universe?

    Following is an entry from Q is for Quantum by John Gribbin. infinity There is more (sometimes less) to infinity for a mathematician than to the person in the street. Science-fiction fans and amateur philosophers may be familiar with the idea that, if the Universe is infinite, then not only...
  7. E

    Russell's type theory, ZF set theory

    What are the weaknesses and strengths of Russell's type theory? I'm having trouble understanding exactly what makes it weaker than ZF. I've been told its too restrictive, but what exactly makes it more restrictive than ZF? Are there any objections to ZF?
  8. Loren Booda

    News What type of government do the ins s in Iraq seek to impose?

    What type of government do the insurgents in Iraq seek to impose? If insurgents succeed in establishing a state based on terrorism, would it not be fractious and set Iraqi society back a millennium (a la Afghanistan under the Taliban), or would it ally with one of the existing Iraqi political...
  9. Mk

    Differences Between P and N Type Materials

    What are, and the diffrences between p and n type materials?
  10. S

    Reducing 2nd order to 1st order type question

    Help! I'm just starting this class and I have no idea what's going on. What I don't understand is, what answer are you supposed to give? My question says "Find the general solution and also the singular solution, if it exists". What the hell does that mean? Can someone tell me if this...
  11. A

    Mathematica How do I type mathematical statements?

    I've seen people in the homework help forum type mathematical statements such as fractions, exponents, integrals, etc. Anyone know how I can do this? Thanks.
  12. M

    A different type of pulley question -help

    Okay, I have this crazy pulley question where a guy is sitting in a box that is attached to a pulley on the ceiling (the pulley system is ideal). He pulls himself up at a constant velocity -how do i find the force needed for him to pull himself up? (the rope goes around the pulley and back...
  13. E

    Suggest a type I receptor endocytosis

    Hi everyone, I was wondering if anybody could suggest a type I receptor that is able to undergo internalization but that is not involved in any type of signal transduction that would lead to apoptosis or proliferation? Thanking you in advance, Emily
  14. S

    Can You Handle These Types of Women?

    HARD-DISK woman/Man: She/He remembers everything, FOREVER. RAM woman: She forgets about you the moment you turn her off. WINDOWS woman/Man: Everyone knows that she/He can't do a thing right, but no one can live without her. EXCEL woman/Man: They say she/He can do a lot of things but you...
  15. K

    EPR type thought experiment with black hole

    Assuming that I have an atom that produces two photons having opposite polarization, and I send one toward the event horizon of a black hole and the other is sent to a second observer who does not measure his photon's polarization until enough time has passed to insure that the other photon has...
  16. A

    A couple of groovy avatar type pictures I made

    I was bored and started playing with little pictures using Japanese stuff: http://bad-sports.com/~archive/images/avatar.gif http://bad-sports.com/~archive/images/yinyang.gif
  17. Z

    Music Well, what type of music does everyone listen to?

    Well, what type of music does everyone listen to? As for me, I'm into Power Metal mainly. Some of my favorite bands are... - Blind Guardian - Edguy - Ayreon - Kamelot - Angra - Symphony-X - Children of Bodom - Sonata Arctica
  18. G

    What Are the Two Things Humanity Needs to Lose for Civilization to Advance?

    To all futurists: I have written an essay at Project Global Consciousness about the two things humanity needs to lose before we have a hope of getting to the next level of civilization. This will be the first time the page is open for comments, and I would enjoy reading your thoughts...
  19. A

    What type of motherboard do I have?

    Hey guys; This is a Dell Dimension 8100. It is a few years old. I'm looking to get a new case for it (rack mount), but I don't know what type of motherboard it is. I fear it may be proprietary. Click here: http://www.think-evolution.com/mycase.jpg I guess if its proprietary, I may...
  20. H

    Do you prefer walking across a flat or arched type design?

    We're doing a project for my engineering tech class, and i need to conduct a survey, we'd be really obliged if u could answer the survey questions. 1. When thinking about bridges, what is the first bridge that to your mind? 2. Why? 3. If crossing a bridge, do you look over the edge? 4...
  21. A

    Wireless USB type bridge thing?

    Hey guys; Is there currently any type of Wireless USB bridge thing? What I mean.. I have a laptop, and when I use my digital camera I have to plug it in the back of my PC, which means I have to pull out the USB cable and bring it to my laptop, etc. Is there any way I can have the USB...
  22. M

    Calculating Activation Energy for X+Y -> XY Reaction

    is there a way to tell the activation energy for a reaction mathmatically just based on what the reaction is, or what it contains? or do you just have to know what it is, based on looking off a table or some other way of finding that data. lets say I have a hypothetical reaction: X + Y -> XY...
  23. Whitestar

    Type I, II, & III Civilizations: Reaching for the Stars

    In Dr. Michio Kaku's excellent book entitled, "Hyperspace", he discusses about three kinds of civilizations: Type 1, 2, & 3 Civilizations A Type I civilization would be able to manipulate truly planetary energies. They might, for example, control or modify their weather. They would have...
  24. D

    The only type of my songs getting on here

    are either going to be political or about news... Well, this one is about the paparazi. I think that the press gets too personal with people, and they never give them their privacy. These are people too, they deserve their privacy. Must we be reminded of Princess Diana's tragedy to see this...
  25. E

    What type of particles is fire made up of?

    What type of particles is fire made up of?
  26. A

    Involving Yersinia pestis and B-blood type

    Hey guys, in my microbiology class last semester my prof mentioned that the plague, caused by Yersinia pestis, which was in Europe, etc. He said that the reason that Y. pestis killed so many people was that it had the same surface antigens as type B blood, therefore people with (type B and type...
  27. maverick280857

    Bicycle Type Chain [Mechanics] Problem

    Hi guys.. I am a new member of physicsforums.com (I am a science student at the pre-undergrad level). I am unable to solve a problem involving motion of a chain along a circular track, in classical mechanics. The problem is from an old book on mechanics. Please read the problem (below) and...
  28. G

    To The Next Type of Civilisation

    I'm writing to you, whom I hope to call my friends, rather than write Dr. Kaku personally, which would not only be an unproductive step toward my goal, but I quickly realized that with the existence of this forum, my real goal is here, and is certainly furthered by my membership with you. I...
  29. K

    What Causes the Gradual Increase in Conductivity in Type 2 Superconductors?

    The copper-oxygen planes that are believed to be responsible for superconductivity are separated by many insulating layers layers. So there might not be much overlap between atomic orbitals between separated Cu-O planes. However, electrons can still tunnel through the insulating layers. This...
  30. P

    Understanding Internet Connection Types for Beginners

    Would you please tell me what it is in an internet connection ? I see it written in my firewall windows, I am only curious to know what it really means... Thanks
  31. F

    Is the Efficiency of This Electric Motor Too Good to be True?

    I think this is a hoax. http://www.japan.com/technology/index.php they power out > power in.
  32. R

    Type IV Civilizations - Info & References

    Hi Forum, I am looking for information on Type IV and above civilizations. If anyone has any references I would appreciate it a lot. I understand an astronomer called john barrows has written on this but I can't find anything on google on this. nor has a 'Type IV civilization' search...
  33. wolram

    Type Ia Supernovae Evidence of Cosmic Deceleration & Acceleration

    http://arxiv.org/abs/astro-ph/0402512 We have discovered 16 Type Ia supernovae (SNe Ia) with the Hubble Space Telescope (HST) and have used them to provide the first conclusive evidence for cosmic deceleration that preceded the current epoch of cosmic acceleration. These objects, discovered...
  34. I

    Inductors i think it'll make an harmonic type of move

    as far as i know about inductors i think it'll make an harmonic type of move... but it seems to make no sense can anyone help?
  35. M

    What Is a Fermionic Condensate?

    http://news.bbc.co.uk/2/hi/science/nature/3441643.stm
  36. J

    Towards a Type 1 Civilisation. How do you want your future?

    Dr. Kaku, Carl Sagan, and the majority of the scientific community recognises the need for society (esp. in the United States) to wake up to the threats that human activity, through pollution and nuclear energy, pose to the future of humanity and the planet. Not to mention future threats from...
  37. fffbone

    Best Wood for Constructing Heavy-Weight Apparatus

    This is a question that has been hunting me for ages: which type of wood would be best for constructing a apparatus to hold the largest amount of weight with the smallest mass? I would appreciate it very much if someone can give me some help.
  38. Mk

    Type II superconductors definition?

    What is the definiton of a high temperature superconductor otherwise known as Type II superconductors?
  39. S

    Type I Civilizations: Have We Been Visited?

    Have we been visited by this type?
  40. I

    Is 27O2 + 4C4H9NH2 -> 16CO2 + 22H20 + 2N2 a Combustion Reaction?

    27O2 + 4C4H9NH2 -> 16CO2 + 22H20 + 2N2 What classification would you give this reaction? ------------------------------------- Its a decomposition reaction . . . why? My teacher told me that combustion reaction's always have a Carbon/hydrogen compound on the reactant side w/ O2, and...
  41. M

    Blood Types: Why Are So Many People Type O?

    Hi i had a question wondering ok i have heard and read that most people are blood type O. Well since O is a recessive gene how is it that there are so many O types when the other ones should be dominating. I just don't understand it?
  42. wasteofo2

    David Blain and others of his type.

    Some of you must have seen his random specials. Card tricks are one thing, but he takes it to extreme levels of insanity. For those of you who haven't seen both magic specials (one is remarkably underplayed on tv), here are some things he's done. Had people write their name on a card...
  43. I

    What Type of Engineering is Best for Designing a Spacecraft?

    I'm a Canadian student that is going into engineering next year, and I don't know what type of engineering I should go into. In Canada, some schools offer a common first year and you choose your discipline in the second year. The thing is that these schools do not offer aerospace...
  44. S

    A Type I unit of power, the Sol

    It's fun to think about the far-out Type II and III civilizations, but how close are we now to Type I? M. Kaku says the output of our star is about "a billion trillion trillion ergs per second". That is, if I have done the arithmetic correctly, 10^33 ergs/sec or, dividing by 10^7, 10^26...
  45. Math Is Hard

    Mystery of Type 1a Supernova: No Hydrogen in Spectrum

    This is something that mystifies me -- If the first stars were composed of only hydrogen and helium, why does a Type 1a Supernova show virtually no hydrogen in its spectrum? It seems logical that we would see an abundance of hydrogen. Thanks!
  46. Whitestar

    How long until we reach Type 1, 2, & 3 civilizations?

    Type 1, 2, & 3 Civilizations Note to newcomers: This is a very old thread that does not meet the current forum guidelines and has therefore been closed. In the excellent book entitled, "Hyperspace", theoretical physicist Michio Kaku mentioned about three kinds of civilizations: Type 1, 2, & 3...
  47. M

    What is Dark Energy: The Most Common Type of Energy in the Universe

    What's dark energy? It's important to know what is the most common type of energy of the universe
  48. S

    Why does integrating both sides of a differential equation work in physics?

    In my calculus course I was tough to solve differential equations by separation and then integrating For instance dv/dt = a dv = a*dt v= a*t + c (c is a constant of integration) then if I was given an initial condition such as v(0)=Vo I would substitute into my general solution and...
  49. S

    Is There a Men of Physics Book Similar to Men of Mathematics?

    I'm coming towards the close of a good (yet dated) book: Men of Mathematics, by E.T. Bell. For those of you who haven't read it, the book gives a detailed accounts of the lives up the many recent greatest mathematicians and also touches upon the work they did. Is there a book that would be...
  50. M

    What type of Physics software do you want?

    Hi, Please forgive me, I know not whether this is the appropiate forum to post to or whether I should ask, but... I am inquiring what type of Physics software that is needed, I'm mostly interested in High School level. What would be benificial to the student? What could help the student...
Back
Top