summaryrefslogtreecommitdiff
path: root/docs/type_system/shared.md
blob: dd46afa964eaf21d3c79078053670040758b38b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Shared

---

```text
Shared_collector `alias Enum[Void; .unknown; .counting; .tracing]

Shared[Shared_collector; TYPE]

Shared[TYPE] // Resolves to Shared[.unknown; TYPE]
```

# Garbage Collection Method

## Unknown

Counting or tracing will determined later on

## Counting

## Tracing

# Mutating

```text
x : Shared[Array] $ (1; 2; 3)
^ x {[y]
    y `push 4
}
`log x // Shared[.counting; Array[I64]] $ (1; 2; 3; 4)
```