On Monday, March 20, 2017 at 8:41:36 PM UTC, Martin Norbäck Olivers wrote:
>
>
> The reason I was thinking about it was not actually anything to do with 
>> garbage collection. I have a data modelling language with a type system, 
>> but it has grown in a slightly ad-hoc manner and needs some 
>> rationalization. I was wondering how well the type alias records + tagged 
>> unions + basic types part of Elm would suit my purposes. As the data models 
>> I build are often mapped onto relational database or mutable objects, I do 
>> need circular references to be possible.
>>
>
> I don't see the rationale for requiring circular references to map onto a 
> relational database though, they are referenced by key, not by pointer.
>

This is true. Its more for the object side of the mapping where both sides 
of a relationship may hold a reference to the other. Also for the data 
modelling side, where I want to be able to describe that 2 entities have a 
bi-directional relationship.
 

> Mutable objects can of course use circular references, and some algorithms 
> depend heavily on them, but they are a pain to handle for instance when 
> serializing. Which you do a lot in a web app.
>

Yes. This is a big part of what I do with these data models - figure out a 
good default mapping of a relational model onto chunks that can be 
serialized. Based on applying a set of heuristics to the data model.

-- 
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