Mercurial > repos > public > sbplib_julia
changeset 735:3e0b0b44868e feature/static_dict
More docs
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 17 Mar 2021 21:29:37 +0100 |
parents | 1a8ef927e732 |
children | b5d9fbcdcef1 |
files | src/StaticDicts/StaticDicts.jl |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/StaticDicts/StaticDicts.jl Wed Mar 17 21:24:57 2021 +0100 +++ b/src/StaticDicts/StaticDicts.jl Wed Mar 17 21:29:37 2021 +0100 @@ -8,9 +8,12 @@ A static dictionary implementing the interface for an `AbstractDict`. A `StaticDict` is fully immutable and after creation no changes can be made. -The immutable nature means that `StaticDict`s can be compared with `==`, in +The immutable nature means that `StaticDict`s can be compared with `===`, in constrast to regular `Dict`s or `ImmutableDict`s which can not. (See -https://github.com/JuliaLang/julia/issues/4648 for details) +https://github.com/JuliaLang/julia/issues/4648 for details) One important +aspect of this is that `StaticDict` can be used in a struct while still +allowing the struct to be comared using the default implementation of `==` for +structs. Lookups are done by linear search.