summaryrefslogtreecommitdiff
path: root/docs/type_system/shared.md
blob: 54c9dc58e2200a94edaf4ed2ad885296c3968894 (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
32
33
34
35
# Shared

---

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

Shared[Shared_collector; TYPE]

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

# Garbage Collection Method

```text
Shared[TYPE]
```

## Unknown

Counting or tracing will determined later on

## Counting

## Tracing

# Mutating

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