-
|
Some gedcom constructs, like several enums have a tag OTHER, and a a rule saying that OTHER must have a PHRASE. The grammar rules allow for phrases even if the enum is not the OTHER. So what is safe to do here? I am wondering because I am trying to map this to a programming language, and the obvious choice is a variant type (like an enum with payload), but do we need to add an optional string to all variant cases? E.g. for the public enum NameType {
case AKA
case BIRTH
case IMMIGRANT
case MAIDEN
case MARRIED
case PROFESSIONAL
case OTHER(String)
}but as the type is used as follows: The grammar allows phrase also to be set with the cases which are not OTHER. Can we ignore phrase for non-OTHER enums, and if not, how is it to be understood? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Discussion in GEDCOM Steering Committee meeting 6 MAY 2025: Thus the phrase is permitted independent of the name type. |
Beta Was this translation helpful? Give feedback.
Discussion in GEDCOM Steering Committee meeting 6 MAY 2025:
Phrase is valid for non-OTHER enums.
Here's an example:
Thus the phrase is permitted independent of the name type.
We observed that the spec has examples of dates with phrases, but no examples of names like above.
We can add this example into the spec.