Jump to content

英文维基 | 中文维基 | 日文维基 | 草榴社区

Talk:Composite data type

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

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 192.35.35.34 (talk) 17:37, 9 June 2009 (UTC)[reply]

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)[reply]

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)[reply]
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)[reply]
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)[reply]
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)[reply]
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
end;
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)[reply]
I agree. Also, Struct should be merged with it. Mike92591 (talk) 20:14, 14 May 2009 (UTC)[reply]
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)[reply]
No, it should be deleted. — Preceding unsigned comment added by 68.183.23.147 (talk) 03:02, 17 January 2013 (UTC)[reply]

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 2.179.218.41 (talk) 22:46, 27 February 2015 (UTC)[reply]

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

[edit]
The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section. A summary of the conclusions reached follows.
The result of this discussion was  Already done. Be bold, don't discuss non-controversial splits. {{replyto}} Can I Log In's (talk) page 20:56, 17 April 2020 (UTC)[reply]

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)[reply]

The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.