Talk:Composite data type

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing  
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology 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.
 ???  This article has not yet received a rating on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.

This is just wrong. These are NOT what C and C++ call composite types. A struct is what C calls an aggregate type. a composite type in C is a completely different type. —Preceding unsigned comment added by (talk) 17:37, 9 June 2009 (UTC)

Is the article justified?[edit]

I think this article and record are describing essentially the same concept. Perhaps it should be merged with that as well.

Derrick Coetzee 16:55, 5 May 2004 (UTC)

I think this article has its own meaning of existence - besides two similar articles Object composition and C++ structure - and should not be merged. Deryck C. 09:29, 1 February 2006 (UTC)
This article does not seem sufficiently justified. The notion of "composite type" is extremely broad, rather fuzzy, and language-dependent, so there is little that can be said in general about this class that is not better said in the data type article itself and more specific articles. Ditto for primitive type. Indeed the distinction between the two is quite debatable; S-expressions for example are a primitive type for LISP but definitely a composite type, and strings in C are just arrays. Methinks that primitive type and composite type should be a very short articles, little more than dictionary entries, with all material moved to data type or other articles. All the best, --Jorge Stolfi (talk) 19:34, 10 May 2009 (UTC)
I don't see what you mean. S-expressions themselves are not data types and arrays aren't composite types. Mike92591 (talk) 20:14, 14 May 2009 (UTC)
It is my turn to say: I don't see what you mean. In most languages, such as Pascal, the programmer can define new array types. By the article's own definition, those are composite types.
As for S-expressions, they are THE main data type in LISP; why do you say "not data types"?
All the best, --Jorge Stolfi (talk) 20:28, 15 May 2009 (UTC)
The article's definition is incorrect. Like composite types, arrays are derived types but, there is a significant difference. Composite types are aggregates. Here's an example:
a = array[1..10] of integer;
b = record
    c: 1..10;
    d: integer
b actually contains the types 1..10 and integer but a just uses them. S-expressions are just expressions. You're probably thinking of lists but, those can be broken down further into "atoms". Mike92591 (talk) 00:56, 16 May 2009 (UTC)
I agree. Also, Struct should be merged with it. Mike92591 (talk) 20:14, 14 May 2009 (UTC)
I can see merit in having articles on struct (C programming language), or composite type (C++), or generally XXX type (YYY programming language). However, different languages have not only vastly different type systems, but also vastly different nomenclatures for speaking about types and vastly different ways of classifying and defining them. Thus any article on a special class of data types that is not tied to some language risks being biased and arbitrary. Methinks this is the case with this article. All the best, --Jorge Stolfi (talk) 20:41, 15 May 2009 (UTC)
No, it should be deleted. — Preceding unsigned comment added by (talk) 03:02, 17 January 2013 (UTC)

It is definitely wrong. there is no composition of types in aggregates, only a simple arrangement of older types in a structure. — Preceding unsigned comment added by (talk) 22:46, 27 February 2015 (UTC)

Proposed move of (most of) the "C/C++ structures and classes" section into struct (C programming language)[edit]

If nobody has any objections, I'm going to merge a big chunk of this article (the examples specific to C and C++) into the article struct (C programming language). I think this article has better language for the most part, but the other article covers a couple things this one doesn't. --Libertyernie2 (talk) 21:30, 23 July 2014 (UTC)