Which Elixir version(s) are you (still) using on your non-pet projects?

This was the thread I think? which announced there will be a second poll at some point to get community feedback, which seems really split Changes to the struct update syntax

If that is where we’re headed, not so much a workaround as you will get type warnings unless you pattern match before updating the struct with that syntax. So if you don’t really use that syntax (which seems to be most of the people ok with deprecating it and don’t feel strongly really), then it will be just prodding you toward best practices with pattern matching (which hopefully you were already doing). If you were using that syntax heavily as a type guarantee, you will have to do something more than (not necessarily instead of) what you were doing.

It’s honestly not quite clear to me if pattern matching is “better than” struct update in terms of guarantees it provides. It seemed like that’s what José was saying but I didn’t dig in enough to follow.

2 Likes