I've just published a new library called `attribut...
# feed
a
I've just published a new library called `attributes-kt`: https://git.sciprog.center/kscience/attributes-kt (there is also a github mirror https://github.com/SPC-code/attributes-kt). The library is dedicated to storing and manipulation of type-keyed immutable attribute containers not unlike kotlinx-coroutines context keys (but more flexible for other uses). The library was present for some time and was used in other SPC projects: KMath and Maps-kt. Now I decided that it makes sense to publish it separately. In KMath it is used to designate features of mathematical objects like matrices (for example to mark diagonal or upper triangular matrices). In Maps-kt it is used quite extensively to define visual features of objects like color or click listeners (it is Compose-friendly because it relies on immutable structures). There are also several additional tools like generic annotations for unsafe and and unstable API. But the most important of those is
SafeType
wrapper that provides compile-time type safety for KType (when you need to ensure that KType refers to the type parameter. Contributions and discussions are welcome.
👍 2
❤️ 1