Comment by yccs27
4 hours ago
The article is a bit confusing, but I like the concept behind symbols: Basically a way to distinguish identifier names (chosen by the programmer) from user-facing strings.
The distinction between is one I've mentally adopted in other languages like Python as well. For personal projects I like to use single quotes for 'symbols' and double quotes for "strings", e.g.:
add_label(text="Hello World!", align='center')
Does anyone else do something similar?
Single vs double quotes is also semantically significant in Ruby. Double quoted strings support interpolation whereas single quoted does not.
I almost never use single quotes unless I’m in someone else’s code that already used single quotes. And then I have to fight the urge to not change everything to double quotes just because.
> Does anyone else do something similar?
I do exactly the same thing. Did you also derive it from Erlang?