3 ms·
> I just wish that more languages had symbols. They're just a global enum, almost all languages have enums.
by NikkiA 2y ago
> I just wish that more languages had symbols.
They're just a global enum, almost all languages have enums.
- jmercouris 2y agoIs the implementation specified that they are a global enum? I don't believe so.
- BoingBoomTschak 2y agoSymbols are dynamic, not static. And uninterned symbols exist. You could say that it's a global (per package) weak hash table, from my understanding.
- dreamcompiler 2y agoSymbols exist as data structures at runtime that can be inspected, have their names compared, and have a value that is separate from their name. Enums typically don't do any of that.