1

What is the best name for the abstract thing which contains components?

Context: I am writing an abstraction in a computer program. My domain consists of abstract entities. I don't know what concrete entities will exist later on. But I know, some entities are components of other entities.

An example concretization of the abstraction would be the entities house, window and door. Here window and door are components of a house. So the house is the ??? of windows and doors?

The word will be used in source code and also on the user interface. In questions or in error messages:

  • Is a house a ??? of a window?
  • What is a house the ??? of?
  • What is the ??? of a window?
  • Error: A door is not a ??? of a window.

Note that the word must work in unknown domains. Instead of house, window and door. It could be body, arm and finger. Or continent, country and city.

The user will be building a tree of entities of his own choice. The software needs to name them as entities, components and ???.

An entity could be a component and a ??? at the same time.

A compound word would be ok, but the shorter, the better.

What I have ruled out:

  • collection - because usualy a collection has items of the same type. and collection is already used in the core of my programming language and this would create a name collision.

What I am considering:

  • container
  • composition

closed as off-topic by Spencer, Hot Licks, jxh, tchrist Oct 22 at 2:33

  • This question does not appear to be about English language and usage within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What words have you ruled out? I assume that you've eliminated "container" as an option. – KillingTime Oct 21 at 15:01
  • 2
    Formally, a component is one of many items which compose a composition; but that's not likely to be very useful for the ordinary user. Why not use the simple terms whole and part? -- "Is a house the whole of which a window is part?" – StoneyB Oct 21 at 15:25
  • I like container. The word component is already set, so whole is not that good. – Witek Oct 21 at 16:20
  • 1
    It would be odd to say that a house is a container for its doors, windows, etc. If one were to characterise a house as a container, one would probably be thinking of it as a container for, say, furniture, i.e. for things that are within it, but distinct from it. – jsw29 Oct 21 at 20:28
  • 3
    I'm voting to close this question as off-topic because this type of naming question is specifically excluded in the help center. See: english.stackexchange.com/help/on-topic – Spencer Oct 21 at 20:32
5

You could try

assembly

Merriam Webster says:

a: the fitting together of manufactured parts into a complete machine, structure, or unit of a machine

b: a collection of parts so assembled

4

I'd go with parent in this case. The parent has several child components. A "parent-child relationship" is a pretty common phrase in computer science, and it would seem to fit most of your examples:

  • Is a house a parent of a window?
  • What is a house the parent of?
  • What is the parent of a window?
  • Error: A door is not a parent of a window.
1

I will go out on a limb and say that "vessel" can be used to fit your requirements, or at least people will understand it clearly enough, and saying 'A house is a vessel of a window' sounds cool enough.

https://www.thefreedictionary.com/vessel

vessel

container; water craft; airship:

vessel (ˈvɛsəl)

n 1. any object used as a container, esp for a liquid

Notice the linked dictionary doesn't contain spaceship, but Chekov used it as such anyways.

  • Neither vessel nor container (suggested above) can do the job, because things contained in a vessel/container are not its components. Wine contained in a bottle is not a component of the bottle. – jsw29 Oct 21 at 20:25
  • @jsw29 container is not ruled out, the question says so itself, so thus neither is vessel. – user47014 Oct 21 at 20:28
  • @jsw29 and since a vessel can also mean a craft, which have doors and windows and such, it's easy to use it in a way like the example I give. Not to mention a container can have a door and a window. Or are you arguing that a person in the house is not part of the house so the OP's example itself is wrong because it can contain things that are not its components? – user47014 Oct 21 at 20:33
1

I'd use the word corpus to describe something made up of smaller components.

A corpus is the body of the whole which is then comprised of smaller units. It's used in literature to describe an entire body of works. It also refers to a collection of pieces of knowledge on a subject.

The term originated from anatomy, meaning the body. Bodies are composed of limbs and organs, and you can argue that these serve the same function as your program components.


Also, given that we're discussing computer programming, there already exists a term for this sort of thing:

Program. For example: Microsoft Word is a series of components and subroutines brought together into one program.

A collection of programs is usually called a suite. For example: Microsoft Office.

You may wish to stick to these existing conventions.

1

Two terms probably worthy of consideration are "aggregation" and "compound".

References:

From The Free On-line Dictionary of Computing (18 March 2015) [foldoc]:

aggregation

 <programming> A composition technique for building a new
 {object} from one or more existing objects that support some
 or all of the new object's required interfaces.

 (1996-01-07)


Compound \Com"pound\, a. [OE. compouned, p. p. of compounen. See
 {Compound}, v. t.]
 Composed of two or more elements, ingredients, parts;
 produced by the union of several ingredients, parts, or
 things; composite; as, a compound word.
 [1913 Webster]
0

Microsoft uses the word collection. ICollection is a base class of List<> And Dictionary<> among others. Typically a Collection contains homogeneous items. At least all using a common base class.

Your house could contain “Feature” base class object that are subclassed into “Window” and “Door”

Your house could also contain multiple properties that are themselves collections. House.Windows[4] and House.Doors[3]. If this is the case for your code, then house is not a collection. It is a class or object with properties.

Aside, for visual elements Microsoft uses the word Container.

At least if you follow Microsoft’s recommendation you will use a language common to many developers and that has value.

  • 1
    Good answer. It makes the point I was making at the end of my answer. Use existing terminology from the CS world. +1. – David M Oct 21 at 15:50
  • I think collection is misleading, because it already has a very specific meaning in the programming language. And it is different from what I am looking for - it si for items of the same type. – Witek Oct 21 at 16:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.