Re:Microfeatures I'd like to see in more languages
by sanderjd on Thursday January 05, 2023 @10:11PM
(#34270479)
As the article covers, they are nice syntactically, regardless of those performance considerations. They fill a niche that in my experience actually turns out to be more common than string literals (though less common than strings as actual textual data).
I haven't written ruby (or any lisps) for awhile, and I miss symbols.
1. mutable strings (ruby)
2. and / or expensive strings (erlang)
If you have immutable "dense" strings and interning, and you automatically intern program symbols (identifiers, string literals, etc...) then symbols give you very little.
And then there's the slightly brain damaged like javascript, where symbols are basically a way to get some level of namespacing to work around the dark years of ubiquitous ad-hoc expansions so you're completely stuck unable to add new program symbols to existing types because you could break any page out there doing something stupid.