Closed brunoborges closed 3 years ago
I have a PR in the works to replace the name of this type with "collection", and to adjust the README.md
to state that a collection can be represented by subtables of a common table in TOML. I'm also replacing "childs" with "children", which I wouldn't fuss about normally, except that I encountered it while updating the text for collections.
The
sequence
type as it's currently defined is an excellent concept. But the name "sequence" is terrible, and a different name ought to be chosen.Defining a "sequence" with the
typeof
key is a stellar idea, because it quickly gathers together common data under a single table and allows names to be expressed as parts of table headers. It brings both dynamism and order to TOML by encapsulating an eminently simple means to keep the names useful and to prevent context-freename
keys from sprouting up needlessly.However, the word "sequence" implies that the subtable names have a fixed order. That is not necessarily the case. The names are treated like keys in the sequence table, meaning that they are not ordered by default.
I would suggest a different name for this type. The word that immediately springs to mind is
collection
. But that word could be confused with a VB-style Collection, which does possess an inherent order. Since this isn't universal, the namecollection
may still work. Other potential names includeset
(could be confused for a group of unique values),relation
(from database theory but not widely known), orgroup
(which I like but is an overly broad term).Originally posted by @eksortso in https://github.com/brunoborges/toml-schema/discussions/5