I think Elixir 2.0 should drop structs

This is something that bit elixir-ls lately Breaking changes in Range on 1.12 · Issue #11110 · elixir-lang/elixir · GitHub
TLDR; elixir standard lib itself was matching on struct fields and structs created with code compiled on earlier elixir broke on newer.

@darkmarmot what you are experiencing is quite expected in any situation where data schema may change over time. Data schema versioning issues pop up everywhere (e.g databases, rpc protocols, even memory layout in C structs). That’s why code dealing with such data needs to be extra careful to not expect things that may not be there and all changes to the schema should be additive rather than destructive (for forwards and forwards compatibility.

1 Like