# const global values can reference each other · gitcafe/zig

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

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

Visibility: public

Requested revision: 2dfb1ebee2bc215271e5416b723d746af319621b

Requested commit: 2dfb1ebee2bc215271e5416b723d746af319621b

Commit: 2dfb1ebee2bc215271e5416b723d746af319621b

Tree: 9b859eebd0926cb82c7370362baafec617e763dc

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

````
const global values can reference each other

Before, if you did something like:

```
const hi1 = "hi";
const hi2 = hi1;
```

This would create the "hi" data twice in the built object.
But since the value is const we don't have to duplicate the
data, now we take advantage of this fact.

closes #336

````

## Parents

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

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