Everything inside it is still reused.  Back to the struct if you do 
something like:
```elm
{ model | something = blah }
```
It is making a new model struct, but all the things in its keys other than 
'something' are re-used.  And actually something should be re-used too if 
`blah` is just `blah = model.something`.  You can look at the generated 
javascript.  :-)


On Friday, November 4, 2016 at 9:34:44 AM UTC-6, Lars Jacobsson wrote:
>
> I'm sure many of you have sen Richard Feldmans amazing talk on impossible 
> states from Elm conf. In there he uses a Union Type for working with his 
> data
> History = 
> History =
> { current: Question
> , others: List Question }
>
> This essentially means every time we want to update something in the 
> History, we'll have to use the "History" - constructor instead of the 
> regular record update syntax ( { questions | ... } ). How does this impact 
> performance? I've heard that regular record updates essentially reuses 
> everything that hasn't been changed. But when we are using a constructor - 
> do we get any reuse or are we creating a whole new questions object under 
> the hood?
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to