2 ms·
Virgil has enums where each enum value can have additional fields, so you can write tables and name individual rows. Under the hood the enum value is just an in
by titzer 4y ago
Virgil has enums where each enum value can have additional fields, so you can write tables and name individual rows. Under the hood the enum value is just an integer and "accessing a field" is just an access of a constant in an array.
It's turned out to be incredibly useful.
https://github.com/titzer/virgil/blob/master/doc/tutorial/Enums.md https://github.com/titzer/virgil/blob/master/doc/tutorial/En...