aboutsummaryrefslogtreecommitdiffhomepage
path: root/notes/uninit_vars.txt
blob: 5e78b2d01ee5da71e492c5346e2c4cec25c97155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Uninitialized variables/fields
==============================

Simply "zero-initializing" does not work for some types of data:
- non-nullable refs
- integers with ranges
- other kinds of constraints?

Simplest solution: Always require initialization:
- in scalars
- in structs/arrays
- in return values (e.g. returning a struct)

BUT: we want to:
- not require large arrays to be initialized
- track uninitialized data, rather than just setting it to a default value