Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

370 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DynamicObjects.jl

Dev Docs CI

Structs with lazily computed, optionally disk-cached properties.

using DynamicObjects

@dynamicstruct struct MyStruct
    a::Float64
    b = a + 1        # derived from `a`
    c = b + 1        # derived from `b`
    @cached d = c + 1 # disk-cached
    e = d + 1
end

s = MyStruct(1.0)
s.b  # 2.0 — computed on first access, then cached in memory
s.d  # 4.0 — computed on first access, then cached to disk

See the full documentation for details on indexed properties, @persist, scoping rules, thread safety, and more.

See also

Releases

Packages

Contributors

Languages