Skip to content

Update deeply nested immutable structs.

License

Notifications You must be signed in to change notification settings

thomvet/Setfield.jl

This branch is 23 commits behind jw3126/Setfield.jl:master.

Folders and files

NameName
Last commit message
Last commit date
Aug 3, 2022
Jun 3, 2020
Oct 13, 2019
Feb 13, 2022
Feb 13, 2022
Dec 6, 2017
Jun 6, 2019
Dec 6, 2017
May 20, 2022
Jul 7, 2022
Dec 6, 2017

Repository files navigation

Setfield

DocStable DocDev CI

Update deeply nested immutable structs.

Lifecycle

We plan to maintain Setfield.jl for a long time (written 2020-09-21, reinforced 2021-08-01). We will however not add new features. For a successor, see Accessors.jl.

Usage

Updating deeply nested immutable structs was never easier:

using Setfield
@set obj.a.b.c = d

For more information, see the documentation and/or watch this video:

JuliaCon2020 Changing the immutable

Some creative usages of Setfield

  • VegaLite.jl overloads getproperty and lens API to manipulate JSON-based nested objects.

  • Kaleido.jl is a library of additional lenses.

  • PhaseSpaceIO.jl overloads getproperty and setproperties to get/set values from/in packed bits.

About

Update deeply nested immutable structs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 100.0%