-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
Today the type signature is:
-spec get_definition(Module :: module(), RecordName :: atom()) ->
{create_options(),
[{FieldName :: atom(), Default :: dynamic()} | (FieldName :: atom())]}.However, if in the future, we want to add more properties to fields, the signature above won't support it. My suggestion is for it to return maps with default as an optional field:
{create_options(),
[#{field := FieldName :: atom(), default => Default :: dynamic()}]}.Possible new properties could be private fields (only visible with the current module), user metadata, or anything unforeseen. Maybe this will never be added but this should be more forwards compatible.
If you don't beleive this is a good suggestion, feel free to close this issue. :)
Reactions are currently unavailable