From: Bill Kelly Date: 2013-02-08T10:57:33+09:00 Subject: [ruby-core:52021] Re: [ruby-trunk - Feature #7792] Make symbols and strings the same thing Rodrigo Rosenfeld Rosas wrote: > > I'm really curious what kind of programs rely on symbols behaving > differently from strings. One example: Since symbols aren't garbage collected, my Ruby-based RPC system is designed by default to convert symbols in incoming messages to strings instead. (PacketBuf.preserve_symbols_on_extract = false) This has led to sending certain internal messages with names consisting of symbols instead of strings. These messages cannot be spoofed by an external source, as there's no way for a remote sender to produce messages locally containing symbols. (If not for the garbage collection problem, I would have designed the system to preserve externally generated symbols, and so would have then required a different approach to distinguish internal vs. external message names. So current design is arbitrary in that sense, but nevertheless, the symbol/string distinction is being put to use.) Regards, Bill