r/programming • • Dec 08 '19

JSON Decoding in Elm

https://functional.christmas/2019/8
73 Upvotes

56 comments sorted by

View all comments

Show parent comments

1

u/Zinggi57 Dec 08 '19

But you can initialize recodes with named arguments in Elm ({ a = 1, b = 3 }).
I think positional is fine for a small number of fields, e.g. in Vector3 1 2 3 it's fine, but for more fields it becomes a readability issue.

1

u/kankyo Dec 08 '19

Sort of. But you don't have setters in elm (just getters!) so you can't write deserializers in a nice way with names arguments. This is bad.