Possibly removing Symbol Literals from Scala
This one’s new-and-different: there is now officially a proposal on the table to deprecate symbol literals. (Note that this change is proposed for 2.13, not Scala 3, so it’s more imminent than most, although the symbol literals wouldn’t actually be removed until a later release.)
Some of you are probably asking, “What’s a symbol literal?”, and that’s part of why they’re considering removing them. See the above-linked discussion, but the tl;dr is that Scala has long had a somewhat obscure Symbol
class, which allows you to define a symbol that gets interned, allowing you to use and compare it efficiently. They’re sort of like specialized String constants.
There’s also a special literal syntax for them: 'mySymbol
. That’s what they are proposing to deprecate. Symbols would (probably) stick around, but you’d have to be more explicit about them, saying Symbol("mySymbol")
, or possibly sym"mySymbol"
.
I don’t care passionately about this one, but I’m sympathetic to the proposal. This is a very obscure feature — while I know that some of the fancier libraries leverage it, I don’t think I’ve ever used it myself, nor seen it in production code at my clients. It’s rarely taught AFAIK, and is simply confusing to the majority of Scala engineers who come across it.
The arguments in favor of this change mostly boil down to “simpler is better”, that this feature simply isn’t pulling its weight enough to be worth keeping in the language. While I’m not passionate about it, I largely agree. If you care, I recommend checking out the discussion…