summaryrefslogtreecommitdiff
path: root/docs/type_system/shared.md
blob: 84366abc90d3fee732b4f31f3e63cde7d876ec4e (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]
    y `push 4
}
`log x // Shared[.counting; Vector[I64]] $ (1; 2; 3; 4)
```