# Exhaustive Collections Of Structs

DevFeed: [Exhaustive Collections Of Structs](<https://devfeed.tech/articles/exhaustive-collections-of-structs-25809.md>)

Original publisher: [Read original article](<https://www.steveonstuff.com/2019/03/14/exhaustive-collections-of-sructs>)

Author: Steve Barnegren

Published: 2019-03-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [Steve Barnegren](<https://devfeed.tech/sources/steve-barnegren.md>)

Topics: [enum](<https://devfeed.tech/topics/enum.md>), [dataset](<https://devfeed.tech/topics/dataset.md>), [data](<https://devfeed.tech/topics/data.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [collections](<https://devfeed.tech/tags/collections.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [data](<https://devfeed.tech/tags/data.md>), [dataset](<https://devfeed.tech/tags/dataset.md>), [enum](<https://devfeed.tech/tags/enum.md>), [enums](<https://devfeed.tech/tags/enums.md>)

## AI overview

The article examines modeling a heterogeneous dataset, such as a social networking feed, with enums and associated values. It explains that this approach can become difficult to scale and organize, then introduces collections of structs as a more flexible alternative.

## Source excerpt

It's not uncommon that we need to model a dataset composed of a finite number of discrete data types, where each data type has it's own unique data model. This is often the case for table view data sources - they're often comprised of a few different cell types, with each cell type having a different set of properties that it needs to be configured with.