Stream: beginners

Topic: ✔ Perhaps use JavaScript structuring/destructuring?


view this post on Zulip Oliver Schöning (Sep 10 2021 at 08:30):

I'm just curious here about the choice of { something & propToModify = fooBar }
Why not use javascript style syntax of {...oldModel, someProp = someThing }
Would also allow for updating nested data more easily, which for me, has always been a painpoint in Elm that needs multiple steps of local variables.
Maybe good reasons to avoid this syntax?

view this post on Zulip Folkert de Vries (Sep 10 2021 at 08:43):

we want to have { oldModel & foo.bar: fooBar } already, not sure what advantages JS syntax would bring beyond that

view this post on Zulip Oliver Schöning (Sep 10 2021 at 08:47):

Folkert de Vries said:

we want to have { oldModel & foo.bar: fooBar } already, not sure what advantages JS syntax would bring beyond that

I wasnt aware of that! Thanks @Folkert de Vries

view this post on Zulip Notification Bot (Sep 10 2021 at 08:47):

Oliver Schöning has marked this topic as resolved.


Last updated: Jul 06 2025 at 12:14 UTC