Re:Microfeatures I'd like to see in more languages
by masklinn on Thursday January 05, 2023 @04:43PM
(#34267146)
> Replace them with integers at compile time like a global enum, and so the runtime only needs to compare integers instead of potentially lengthy (especially if UTF-16) strings.
All of those strings will be interned, and can thus be compared by identity. Which is an integer comparison.
All of those strings will be interned, and can thus be compared by identity. Which is an integer comparison.