# wasm: make symbol indexes a non-exhaustive enum · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/5ef832133895fd69fc8378463b86759eaab6913a)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 5ef832133895fd69fc8378463b86759eaab6913a

Requested commit: 5ef832133895fd69fc8378463b86759eaab6913a

Commit: 5ef832133895fd69fc8378463b86759eaab6913a

Tree: 08bc27cd8f20de4c928ca0bdc411b6c8d59be465

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: make symbol indexes a non-exhaustive enum

This introduces some type safety so we cannot accidently give an atom
index as a symbol index. This also means we do not have to store any
optionals and therefore allow for memory optimizations. Lastly, we can
now always simply access the symbol index of an atom, rather than having
to call `getSymbolIndex` as it is easy to forget.

```

## Parents

- [c99ef23862573269ae4052bd2236f9803f9e36a2](https://git.cafe/gitcafe/zig/commit/c99ef23862573269ae4052bd2236f9803f9e36a2?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/5ef832133895fd69fc8378463b86759eaab6913a?format=markdown)
