Skip to content

Commit 14251b0

Browse files
committed
Update README
1 parent f97d55a commit 14251b0

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)
88
[![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
99

10+
## About
11+
12+
This is a package for defining and deriving functionality for objects based around interfaces and traits,
13+
outside of the Julia type hierarchy.
14+
It is heavily inspired by [Moshi.@derive](https://rogerluo.dev/Moshi.jl/start/derive), which itself is inspired by
15+
[Rust's derive functionality](https://doc.rust-lang.org/rust-by-example/trait/derive.html), and the design of
16+
[ArrayLayouts.jl](https://github.com/JuliaLinearAlgebra/ArrayLayouts.jl).
17+
18+
The basic idea is to define implementations of a set of functions for a given interface, and types
19+
can overload, or derive, those implementations by specifying the desired interface. This provides
20+
a systematic way to define implementations of functions for objects that act in a certain way but may
21+
not share convenient abstact supertypes, such as a sparse array object and wrappers around that sparse
22+
array. Like in `Moshi.jl` and Rust's derive functionality, traits are simply sets of functions
23+
that can be derived for a certain type.
24+
1025
## Installation instructions
1126

1227
This package resides in the `ITensor/ITensorRegistry` local registry.

examples/README.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
# [![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)
88
# [![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
99

10+
# ## About
11+
12+
# This is a package for defining and deriving functionality for objects based around interfaces and traits,
13+
# outside of the Julia type hierarchy.
14+
# It is heavily inspired by [Moshi.@derive](https://rogerluo.dev/Moshi.jl/start/derive), which itself is inspired by
15+
# [Rust's derive functionality](https://doc.rust-lang.org/rust-by-example/trait/derive.html), and the design of
16+
# [ArrayLayouts.jl](https://github.com/JuliaLinearAlgebra/ArrayLayouts.jl).
17+
#
18+
# The basic idea is to define implementations of a set of functions for a given interface, and types
19+
# can overload, or derive, those implementations by specifying the desired interface. This provides
20+
# a systematic way to define implementations of functions for objects that act in a certain way but may
21+
# not share convenient abstact supertypes, such as a sparse array object and wrappers around that sparse
22+
# array. Like in `Moshi.jl` and Rust's derive functionality, traits are simply sets of functions
23+
# that can be derived for a certain type.
24+
1025
# ## Installation instructions
1126

1227
# This package resides in the `ITensor/ITensorRegistry` local registry.

0 commit comments

Comments
 (0)