|WikiProject Computer science||(Rated C-class, Mid-importance)|
Topic of this article
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 188.8.131.52 (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)
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. 184.108.40.206 01:21, 11 November 2006 (UTC)
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.
>>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 []. Gendut (talk) 02:15, 24 May 2009 (UTC)
Data Structures & Abstract Types
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? --220.127.116.11 15:32, 26 March 2007 (UTC)
merge from Dynamic data typing
- 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
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 (talk • contribs) 09:25, 14 May 2007 (UTC).
Is the page a disambig page?
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.
- 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)
Content from Type system
Types fall into several broad categories:
- Primitive types – the simplest kind of type; e.g., integer and floating-point number
- Reference types
- Option types
- Composite types – types composed of other types; e.g., arrays or records.
- Algebraic types
- Derived type
- Object types; e.g., type variable
- Partial type
- Recursive type
- Function types; e.g., binary functions
- universally quantified types, such as parameterized types
- existentially quantified types, such as modules
- Refinement types – types that identify subsets of other types
- Dependent types – types that depend on terms (values)
- Ownership types – types that describe or constrain the structure of object-oriented systems
- Pre-defined types provided for convenience in real-world applications, such as date, time and money. — Preceding unsigned comment added by Ushkin N (talk • contribs) 01:01, 22 May 2016 (UTC)
Abstract type or abstract data type
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)."
I can't give any suggestions because i don't know much of it