Adzz / data_schema

Declarative schemas for data transformations.
Apache License 2.0
86 stars 9 forks source link

Make the default for has_many / list_of be a [] #25

Closed Adzz closed 2 years ago

Adzz commented 2 years ago

When we define the struct should we do this for any has_many / list_of fields:

defstruct [my_field: []]

right now we just do this:

defstruct [:my_field]
Adzz commented 2 years ago

This is complicated by the whole "default value" thing. I think setting it could be okay but it would end up being set at compile time.... Could be veryyy confusing as to when and what value is being set, so I think i will close for now