2

For example, if an entity may have a variable amount of attributes, with varying attribute keys which map to values of different types.

A glob, so to speak. But while each entity is unique, one might iterate over each entities attributes as their attribute keys are already enumerated, but you have to query for them.

Edit:

Right now I have an "EntityContainer" that exists as a wrapper for a list of Entities, which have maps of varying amounts of Key:Value entries.

The Container doesn't know how each Entity is composed, it just provides an interface for a Client to iterate over the Entities, and query for specific Attributes using Keys already enumerated.

The Client knows what it's looking for, but the Container doesn't. Imagine if the Container was a Ship with Wings, Engines, Gears, Fuels, People, etc. However, that Container could also be used to describe a Building with Walls, Windows, Floors, Rooms, People, Equipment, etc. The Client may want to know how many "People" with attribute "Dead" exist in the respective Container.

What would you call this ambiguous Container...

6
  • 2
    The chemical term would be mixture. Whether it has computer science application I don't know.
    – Stu W
    Commented Feb 23, 2017 at 20:42
  • 1
    This sounds like the way Lisp functions are defined. Aristotle might have called the properties you're talking about as "accidental" properties, but I don't know if there's any special term for a set of such. Commented Feb 23, 2017 at 20:54
  • 1
    That's very close to what I'm looking for. Elements in a mixture can be enumerated and each individual element in the mixture has its own set of molecular structures. However I am looking for a term with a computer science application. I might have abstracted too far up. I'll edit my question to provide some context. Commented Feb 23, 2017 at 20:56
  • I feel like this term is more computer-related than English-related.
    – Hank
    Commented Feb 23, 2017 at 21:11
  • I've seen at least one instance of someone asking for the right word in a programming context, being sent to StackOverflow, asking there, and being sent back here. I'd kinda prefer that not happen again. (This may have been covered in meta, but I didn't see anything in a search.) Commented Feb 23, 2017 at 22:15

2 Answers 2

2

(First off: if you have multiple entities, each with attributes so different that you can't say anything more specific about all the entities (aside from "they're all entities"), a term I prefer over ambiguous or undefined is heterogeneous.)

There's no absolute standard term across all programming languages for a container of heterogeneous entities. The custom is to use the term that applies within the language, because it will denote a specific type with important properties within that language. For example, in C, you would probably refer to a struct. In Java, you might refer to a Collection. In Python, you might refer to a set. Each of these, however, has properties that aren't present in the other two, and trying to refer to one in the context of another language will lead to mismatch problems.

That said, if you're writing informally, I think you stand a good chance of getting the point across by saying collection of entities. A set of entities would connote that the entities are not ordered. A list of entities would connote that they are ordered, without specifying what the ordering actually is. An array of entities would connote that the entities, or their reference pointers, are stored contiguously in computer memory. A group of entities might work, although it might connote too much in a mathematical context.

2
  • I am writing informally, however it's in a programming application; the term I'm looking for would serve as a class type in this particular instance. Commented Feb 23, 2017 at 21:01
  • Saw your edit; I appreciate the extra context you provided. I think "collection" will get your meaning across. So will "container", for that matter; even though it may add an "Enterprise Java Beans" flavor in some contexts, it's generally fine. Commented Feb 23, 2017 at 22:12
1

It sounds like you are describing the Entity-Component-System pattern.

Entity is simply an undifferentiated index.

Component(s) are the attributes, they are tagged with an entity index.

System(s) do the work: they service Components.

People often compare this pattern to a database system where each record (an Entity) has a required unique ID, but can have a variable set of fields (Components).

In the sense that the container is going to have responsibility for the Entities, probably the simplest name is the Entity Manager, and this is often a child to Application (the top level).

3
  • You're right, I'm following that particular design pattern, but somehow can't for the life of me come up with a concrete term that describes a collection of Entities that is ambiguous enough to serve as a class type name. I do like EntityManager as a term, somehow it fits the application much better than "container" or "collection", but still somehow sounds like it's simply a term that describes what is contained, which is inherently undefinable. Commented Feb 24, 2017 at 15:24
  • I am certain you know more about the topic than I do, but doesn't the "composition over inheritance" principle mean you aren't making a parent container? EntityCollection might work, but there is no collection, as entities are an index, and it is usually a direct child of the application itself. In games they often use a struct called "World"
    – Yorik
    Commented Feb 24, 2017 at 15:31
  • You are correct! Composition over inheritance attempts to move away from direct class inheritance (the EntityContainer is simply a collection/composition of its parts, none of its Entities inherit from it in any way). And again, you edge closer to the concept I'm trying to describe; a World type would most certainly contain multiple different Entities of varying attributes, at least from a game development perspective. So while this term would technically satisfy my request for a term used to define a container of varying Entities, it still doesn't sound quite right... Commented Feb 24, 2017 at 16:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .