镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
 
 

Latest commit

 

History

106 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DynamicObjects.jl

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.

Releases

Packages

Contributors

Languages