Talk:Data type

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
WikiProject Computer science (Rated C-class, Mid-importance)
WikiProject iconThis article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.

Topic of this article[edit]

I'm starting this article now that type system is moved out of the way. Type is an abstract concept of type systems but data type is a concrete type of data. While Type system gives an overview on issues on designing a system, this article can give an overview on different kinds of data types used in practise. The topic relates to data structure (an article in need of cleanup) and some stuff in there about the building blocks could be dealt with here. The way I see it, a node of a data structure or data without smaller operable structure is a data type. --TuukkaH 10:46, 28 February 2006 (UTC)

Sorry, but the above paragraph (and also the current Overview section of the article) implies that 'integer' is a data type, but 'array of integer' is not a data type. And that would be wrong. — Preceding unsigned comment added by (talk) 17:34, 7 July 2011 (UTC)

You could differentiate between a "primitive type" and a "compound type", perhaps, but I'm not sure it's a very useful distinction. Ketil (talk) 07:16, 3 April 2012 (UTC)

Lost info?[edit]

The C++ entry has links to datatype (no space) and sub-entries on strong/weak, safe/unsafe, nominative/structural, and static/dynamic typing. These links lead now to the article data type but these entries are missing.

Is this by design or mistake?

Liastnir 14:24, 28 February 2006 (UTC)

The article that was here with those sections is now located at Type system. If you'd like to be really helpful, you can click "What links here" and fix the broken links! —donhalcon 14:39, 28 February 2006 (UTC)
Similarly some articles are looking for Static_and_dynamic_typing. Mathiastck 16:55, 23 August 2006 (UTC)


The compound word "datatype" is sometimes used in place of "data type". It is not clear whether this is an "official" new word or simply the product of us making up new words as we go along. But, it works. 01:21, 11 November 2006 (UTC)

defined range.[edit]

I know I am almost on a lost crusade here but I still believe it to be important to mentions concept of choosing a range needed and let the actual hardware representation to the compiler. And I would like to go further on this as this concept gives are real win/win situation:

  • It is easier to understand for programmer
  • 100% portable type Range_Type is range -5 .. 10; means the same on any CPU or language implementation.
  • Better optimization: The compiler is free to choose either Byte or Integer for the above definition - depending on optimisation setting (speed vs. size).

The concept is so elegant and powerful that it is a shame that is almost forgotten (AFAIK Pascal introduced the notion in the 1970th). So I believe it is important to mention so "Byte, Word, Integer, etc. pp" are not "god given" (Independent of which god you believe in) but what they really are: An implementation detail for which they are alternatives.

See wikibooks:Ada_Programming/Types/range or wikibooks:Ada_Programming/Types/digits for a syntax example.

--Krischik T 12:19, 9 February 2007 (UTC)

>>Who told you that these are always the ranges. These are very naive values. Moreover, who says that one byte has to be 8 bits? Haven't you heard of 9 bit byte? Please don't destroy the charm of wikipedia. I have already seen novices writing on the topics they don't completely know of. Please stop this non-sense.

Some of what you said doesn't make much sense, but ranges as part of a data type is a legitimate topic in data types. Feel free to add it to the article. If you know you are on a crusade, write an article on your own site and leave facts on wikipedia. Also, read "Why Pascal Is Not My Favorite Programming Language" by Kernighan to see the flipside of ranges as part of the type system in a programming language and why they can actually be a bad thing. Here is an HTML version [[1]]. Gendut (talk) 02:15, 24 May 2009 (UTC)

Data Structures & Abstract Types[edit]

Right now, these are both empty sections with 'main article' links in them. Usually you see those prior to at least a short summary of the subject in question, so can someone write that up? Or simply move them to the 'see also' section? -- 15:32, 26 March 2007 (UTC)

merge from Dynamic data typing[edit]

The article at Dynamic data typing is very short and it seems to me it would be better as a section in this article.--NHSavage 21:19, 27 March 2007 (UTC)

Actually on second thoughts it would be better to merge with Type system. I'll change the template.--NHSavage 09:11, 31 March 2007 (UTC)

Real vs. Floating-point[edit]

I think the term "Real numbers" is a misuse in any system that does not provide symbolic algebra: No floating-point type can truly represent Pi or even 1/3. —The preceding unsigned comment was added by Medinoc (talkcontribs) 09:25, 14 May 2007 (UTC).

Is the page a disambig page?[edit]

I moved materials about primitive types here to primitive type, since those are actually more concrete than discussion give there. The consequence of this is that, now, the article is basically a disambig page. On the one hand, this may not be a bad thing, since now type system talks about what data types, how they are used etc. On the other hand, I can't see the point of the existence of this article. I am unwilling to make editorial proposals, but just wanted to point this out. -- Taku 05:38, 8 October 2007 (UTC)


If look at the source cited in our article on data type, you'll see how misleading it is. It changed "Data type as set of values with set of operations", which is a topic amongst others in type theory (different models exists) to "A data type [...] is a set of values and the operations on those values" excluding all other models.

The concrete implementation of types (as done in implementations of programing languages) is a model of a type. But not all types can be modeled by sets. Function types are a problem. See for instance Dana Scott's lattices.

Pcap ping 10:00, 28 August 2009 (UTC)

I don't think this is a concern with the current article, and I might take off the templates at the top of the page.1Z (talk) 15:02, 22 October 2011 (UTC)
Is it commonly accepted that the "type int represents [...] the operations that can be performed on integers, such as addition [...]"? Personally, I would say that functions (say taking two ints and returning an int) are a distinct type from ints themselves, but maybe I'm mistaken? Ketil (talk) 12:59, 23 March 2012 (UTC)

jkbn,m — Preceding unsigned comment added by (talk) 09:37, 25 December 2014 (UTC)

erw rewr ew re rwe r e r er e — Preceding unsigned comment added by (talk) 09:39, 25 December 2014 (UTC)

Content from Type system[edit]

It was misplaced at Type system, please merge it with Data type:

A type of types is a kind. Kinds appear explicitly in typeful programming, such as a type constructor in the Haskell language.

Types fall into several broad categories:

Abstract type or abstract data type[edit]

I am trying to understand why is the definition of "abstract type" used in the section "abstract data type".



I have been two days trying to figure out the diferences between and this particular section seems to use the definitions simultaneously.:

"Any type that does not specify an implementation is an abstract data type"

And another thing is that after the first dot in the same section it says:

" For instance, a stack (which is an abstract type) can be implemented as an array (a contiguous block of memory containing multiple values), or as a linked list (a set of non-contiguous memory blocks linked by pointers)."

and after that it is in the little list of abstract data types. — Preceding unsigned comment added by Elcarlis54 (talkcontribs) 16:16, 3 January 2017 (UTC)

I can't give any suggestions because i don't know much of it