At least since Scala 2.10 postfix operators have been considered to be more or less deprecated, because the interact badly with semicolon inference. They’ve been hidden behind a compiler flag ever since, but they have never actually been deprecated. The documentation says that’s because “several DSLs written in Scala need the notation”. I personally don’t know of any of these DSLs that can’t live without them. I know the duration dsl in the std library used to promote them, but honestly: it’s just as easy and much less error prone to write
2.seconds instead of
To me it seems the only people using postfix ops are people who are new the language, who only end up getting confused when they get strange results or compiler errors. I was half expecting Dotty to have already gotten rid of postfix ops, or that someone else would have suggested it since we’re planning on dropping or simplifying a bunch of stuff in the future. But I’ve seen no discussion about them anywhere. Perhaps people have forgotten they exist?
So if nobody else will suggest it, then I will: let’s deprecate and drop postfix operators, and make Scala a bit less confusing still. Or are there still convincing reasons to keep them?