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

    Binomial and fibonacci heap type

    Suppose you have n elements with integer keys and they are to be put into a heap. What would be the time for creating a heap by repeated insertion into into an initially empty heap? Say, for instance if we are using binary, binomial and fibonacci heap type. Any suggestions?
  2. 0

    Java API: Automatically Buffer Collections?

    Does the Java API have any way of automatically buffering Collections, so that it stores only a certain amount in memory and stuff that was not recently used goes to the hard drive if there is a lot in memory?
  3. C

    How Does a T-Type LCR Filter Affect AC Ripple in DC Output?

    hi if anyone can help me solve this problem (T- type low pass filter)it will be appreciated. i have managed to find the current in the capacitor and form there on i don know what to do. thanks circuit of a resistive load is fed from a rectifier, via a filter. The filter is designed to...
  4. D

    Is there any development in different type of computer gaming?

    Nowadays, the most common computer games need u to use ur hands and fingers (i.e. keyboard and mouse). Or another type of gaming, VR which is less common. But is there any development of gaming taht just use ur brain thinking power to play?
  5. J

    What's your favourite type of differential equation

    Just a small list, mark up any others I have neglected... :cool: edit: already see, I should've put in PDEs with delay...
  6. Chronos

    An HST Program for the Luminosity Calibration of Type Ia Supernovae

    Here is an interesting [and important] paper, IMO: The Hubble Constant: A Summary of the HST Program for the Luminosity Calibration of Type Ia Supernovae by Means of Cepheids Authors: A. Sandage (1), G.A. Tammann (2), A. Saha (3), B. Reindl (2), F.D. Macchetto (4), N. Panagia (4)...
  7. J

    CT Scans vs Ultrasound: What Machine Provides Real-Time Video?

    I know that CT Scans provide still images of various parts of the whole human body. I also know that Ultrasound provides live images and movements of fetuses. Is there a machine/scanner that scans the body and provides real-time video of the organs in operation, including blood-flowing, heart...
  8. K

    Artists use a type of sealant to keep their paintings

    Hi. What I'm looking for is some sort of sealant that will be completely airtight. A liquid. The idea is to be able to cut a potato in half and completely cover it in some sort of sealant so that it stays that way for a very very long time. I know artists use a type of sealant to keep...
  9. M

    Did i do the reduction correctly? algebra type stuff

    Directions: Find all the values of x such that the given series would converge. http://cwcsrv11.cwc.psu.edu/webwork2_files/tmp/equations/fd/74dc1166ac21d3f59ee568a71eb55a1.png Here is my work: http://img203.imageshack.us/img203/9559/lastscan3jv.jpg I got it wrong but is it because i...
  10. I

    What type of fan generally yiels the fastest output velocity?

    Hey everyone i was just wondering, for future reference, which type of fan generally yields the greatest output velocity/volumetric flowrate and a relatively low pressure drop (ie like +/- 10kpa sort of thing), assuming axial speed is the same for each of the general types of fans. This would be...
  11. N

    Does the MWI Affect Results in EPR Type Experiments Across Vast Distances?

    Hopefully, this caught the attention of VanEsch.. :biggrin: Let's say Bob and Alice do an EPR type of experiment. A gazillion entangled pair of photons is sent to Bob and Alice who are 1000 light years apart. They measure the spin of the photons. They do not know yet that this violates...
  12. A

    What Caused the Strongest Explosion in the Universe?

    i was searching for the exact specifics of a type III civilization when i came across this serious news artical http://www.indiadaily.com/editorial/6598.asp" Its about a great explosion which happened approximately 50,000 light-years away On Dec 27 2004. I do recommend reading it...
  13. Evo

    What Type of Social Entity are You?

    Category XI - The Quidnunc Though you don't fit in, and your social graces are sometimes lacking, people like you because you have all the information. http://quizilla.com/users/ProlixFootle/quizzes/What%20Type%20of%20Social%20Entity%20are%20You%3F/
  14. C

    Torque on a see-saw type object

    Torque on a "see-saw" type object I had this question on my Physics test last week. I missed it, and it's now time to do test corrections. I have read through the section once again, but I keep on getting the same answer. A uniform plank XY is supported by two equal 120-N forces at X and Y...
  15. Q

    What Is Your Typing Speed on a Standard QWERTY Keyboard?

    (Damn it! I just broke my only good keyboard with an arch, the "N" key is broken somehow. So I can probably only do 110 or so now. The proper arch is VERY important) If I can figure out how to print the screen I will How fast can you type on a standard, QWERTY keyboard? Dear Kevin ...
  16. D

    Data type: Float Point or Double?

    I'm sure one could find a reason to use any data type. There is a lot you can do with just intergers. I do, however, have a computational physics book and they make wide use of the type double. Could float be used as an alternative?
  17. C

    What type of problem is this? Physics 1 practice final.

    Hi all! Just registered for this forum, wish I had gone looking for help earlier this semester, this would have been nice. My physics final is tomorrow, and I've been trying to finish up the practice final (I have my calculus 3 final and several other assignments also due tomorrow), but I...
  18. P

    Quantum Mechanics Book for First Year Physics Students

    Does anyone know an especially good book/textbook on quantum mechanics that is written for an audience with first year physics knowledge? I will be donig 2nd year QM next year so a book that describes QM well but obviously not a thorough treatment. Thanks
  19. Norman

    Programs What kind of job can a insert type of degree here get?

    What kind of job can a "insert type of degree here" get? We seem to get a lot of questions of this nature on PF, so I thought I would compile a list of the appropriate professional organizations since these are a great source of information on the fields that different university majors can...
  20. W

    Tension and fluid type question

    I would appreciate any help I could get with this problem... A spherical-shaped hollow steel shell, with a radius of 2.5m, containing some instruments, is lowered by a cable into a lake. The shell with its contents weighs 7.2 x 10 to the 5th N on the deck of a ship from which it is being...
  21. Mk

    Why does typing in google.com redirect to google.com/ig?

    When I type in "google.com" When I type in "google.com" into over yonder address bar, it redirects to google.com/ig! Is this because I am signed into Gmail, or because google is pushing their homepage thing now?
  22. F

    Void type function to find the maximum of three given integer numbers"

    I have to answer a homework problem due today that I am not sure how to do the problem reads. "Write a program that calls a void type function to find the maximum of three given integer numbers" We use visual basic studio, any help would be appreciated.
  23. J

    Velocity and resistance problem. diff Eq type

    A body moving with velocity V enounters a resistance in the form of dV/dT=-k*V^(3/2). Show that V(t)=(4v.)/(k*t*sqrt(v.)+2)^2 v. is the same as v(subscript 0) When i solve the differential equation i keep getting V(t)=4/(k*t-v')^2 I have no idea how to get from dv/dt to the given v(t)
  24. N

    Techniques for solving type of Matrix problems

    1) a) If A = 1 2 0 3 and B is an upper-triangular matrix such that tr(B) = 0 and AB = 1 -1 0 -3 then B = _____ AND b) If A = 1 5 -1 3 and A = B+C where B is symmetric and C is skew-symmetric, then B = ___ and C = ____. 2) a) If A, B and C are matrices such that...
  25. T

    Help anyone know how to do this type of problem

    A boy of mass 41 kg rides on a playground merry-go-round at a speed of 2.0 m/s. and has to hold on with a force of 79 N to keep from flying off. What is the radius of the merry-go-round?
  26. H

    What is a Closure Type? Understanding Boost uBLAS

    What is a "closure type"? I first encountered it by looking at the source of the uBLAS package from boost.org -- it's essentially an implementation of the BLAS using expression templates. I noticed that a lot of the classes have a nested typedef called "closure_type" (and a...
  27. dduardo

    What type of american english do you speak?

    Take the test now: http://www.blogthings.com/amenglishdialecttest/ Here are my results: 80% General American English 15% Yankee 5% Dixie 0% Midwestern 0% Upper Midwestern
  28. T

    Mathematica How to upload the mathematical formula i have type?

    i use mathType to type mathematical formulae, after that, what should i do to post the formulae to this forum? Thanks in advanced! :biggrin: :bugeye: :approve:
  29. J

    Second type perpetual motion machine is existent .

    second type perpetual motion machine is existent . miaobo Let us assume that a system make a circulate of thermodynamics ,if we can approve that entropy will not equal to 0 , so the second law of thermodynamics is wrong ,and the second type perpetual motion machine is existent . The...
  30. T

    Can somebody name every type of STD

    Can somebody name every type of STD because I wanted to get tested for all of them just in case I had any. I guess STDs are different from other diseases because they're only transmitted during sex or something? If people are going to get tested for HIV/Aids they need to be tested twice for...
  31. A

    Can You Solve ax+ay-xy=c for x and y Deterministically?

    I need to solve the equations of type ax+ay-xy=c (or) a(x+y)-xy=c In this equation a & c are known.Whether is it possible to find x & y values using a deterministic method other than trial & error method ex 127x+127y-xy=12732...
  32. wolram

    Does BH Mass Boundary Vary with Matter Type?

    For a BH to form it must have a mass boundary, but does this boundary vary with differing types of matter?
  33. S

    Which computer is best for engineering school?

    I have a question about what computer to use for engineering. You see I don't want to use a Windows box and would greatly perfer to use non-redmond software. so..If you are very anti-windows, what makes sense? can you use a mac? is that good for engineering school? A Linux machine? what...
  34. A

    Type =rand(99,99)[Enter] into MS word

    Another microsoft first! Type =rand(99,99)[Enter] into your MS word document into the beginning of the line and see what happens.
  35. T

    Need help typing mathematics? Check out this solution!

    Help me! Can anybody tell me how to type mathematics terms, such as integration? Can anybody tell me that where I can download mathematics solfware so that I can type mathematics text?
  36. C

    How to solve an Improper Integral of Type 2?

    I've posted on Homeworks one of the number I did not understand. However, I would like to know the steps to calculate an improper integral of type 2. The type 2 is the one from constant a to constat b, not the one with inifnite. Please tell me the steps the accomplish it. :smile: I know...
  37. C

    Help Improper Integrals Type 2 argg

    I don't understand my Math Homework, here's the number that I don't get. [int a=1 b=3] 1/(sqrt[abs(x-2)]) dx sqrt = square root abs = absolute value Integral from 1 to 3 Can anyone explain this to me clearly, I'll really appreciate :smile: Thanks
  38. L

    Calculus - taking the limit type questions

    1.) Take the limit as x approaches infinite... Square root of 4x^2 + 1 / 2x-3 umm so i really don't know where to start this..i was going to multiply the numerator and denomenator by 1/x, but i don't know what the numerator would be then.. and for number 2.) Take teh limit as x...
  39. J

    Type of transistor configuration on a circuit

    OK, I need some help here. I can´t really recognize the type of transistor configuration on a circuit (common emitter, common base, common colector). I`ll some tips that help me identify the configuration. Check the circuit attached.
  40. U

    Integral is typical arctan type

    \int_{0}^{1}\frac{4}{1+x^2} \int 4(1+x^2)^{-1} u=1+x^2 du=2x \frac{2du}{x}=4dx 2\int \frac{u^{-1}}{x} dx 2ln(ux) =2ln(x+x^3)|_{0}^{1} =2ln(1+1^3)-2ln(0+0^3) I know I did something wrong, any ideas?
  41. T

    C++ check a type char variable against letters of the alphabet

    I am getting an error I cannot seem to figure out. whenever I try to compile it, it says c is undeclared. I want to check a type char variable against letters of the alphabet in an if function. Maybe someone could explain what I am doing wrong. #include <iostream> #include <cctype>...
  42. F

    Fdarkangel's critique of the word type

    you sound too confident. i guess, in order to categorize "things" into types, there must be a real difference (i hope you're not too pedantic and understand what i mean with "difference": an inequality between terms). please go ahead and explain how your list of energy types are inequal...
  43. H

    Does the type of energy depend on the particle carying it?

    does the type of energy depend on the particle carying it? assuming that electricity is carried by electrons and light is carried by photons, do all types of energy rely on matter to exist? and can one type of particle carry several types of energy?
  44. Astronuc

    Joke of the Day: Dilbert (Scott Adams) Humor - Identifying Wasted Time

    Joke of the day - Dilbert (Scott Adams) kind of humor. SUBJ: Identifying wasted time TO: ALL PERSONNEL FROM: ACCOUNTING It has come to our attention recently that many of you have been turning in timesheets that specify large amounts of "Miscellaneous Unproductive Time" (Code 5309)...
  45. marlon

    What Is the New Chemical Bond Discovered Through Computer Simulation?

    https://www.physicsforums.com/journal.php?s=&journalid=13790&action=view Read the exctract in my journal and look at the site of the beautiful woman that discovered this bound with computer simulation... marlon
  46. R

    What is the pH of a solution containing 50 grams of Na3PO4?

    I think that is what you call it. I need to find the pH of a solution containing 50 grams of Na3PO4. 50 g ---- > 0.305 M We know that Kw=Ka*Kb So, Na3PO4 + H20 --> HNa3PO4 + OH (I think) Kb = x^2/(.305-x) I can't find the value of Kb anywhere in my book, internet. If I had it I...
  47. C

    Type of Expansions and Differential Equations

    Hello all Could someone show me how we get: M(t+dt) - M(t) \doteq \frac{dM}{dt}dt + ... . I know that you use a Taylor Series expansion, but I need to see how it is done as I am new in this subject. How would you derive the formula e^{-r(T-t)} ? Also could someone explain the concept of...
  48. mattmns

    Music file type converters for linux

    What is a good, free of course, program that will convert music. I want one that will convert into mp3 format, or any format that has good quality and is small in size, and will play in xmms. (xmms has been down all day so I have no clue what formats are supported). I use linux btw. Thanks.
  49. M

    New type of 'disc-golf-disc' designed by jon potts

    hey, this is a new type of 'disc-golf-disc' designed by jon potts "He is currently investigating the aerodynamics and control of disc-wings using experimental techniques, based at the experimental fluids and aerodynamics facility, the Goldstein Research Laboratory." i clipped the quote...
  50. S

    Traditional solenoids of C type

    i know the traditional solenoids of C type, D type and cylindrical (tubular) framing but what stops you from making a solenoid from a small tube and wrapping the wire over and over itself many times over?? WOuldn't that make a strong magnetic field / area??
Back
Top