I think some more context would still be helpful here and in the other
question [1]. There, you said that you wanted to set a value in a database
whenever a constructor is called. Is the goal to write something like an
ORM layer?

Coupling database interaction so tightly with object semantics is probably
not workable in Julia (for starters, it is not possible to override field
access or assignment).

An alternate approach is to build synchronization on top of types, either
by explicit serialization/deserialization, or with metaprogramming to
automatically generate hooks (as in e.g. Reactive.jl [2]).

[1] https://groups.google.com/d/msg/julia-users/V-Lp6Ah7Zpk/ICDg1D5oCQAJ
[2] http://julialang.org/Reactive.jl/

On Mon, Jan 4, 2016 at 3:49 PM, Julia Tylors <[email protected]> wrote:

> Topic says it all.
> Thanks
>

Reply via email to