Skip to content

Drop postfix operators #462

Closed
scala/scala
#6559
@Jasper-M

Description

@Jasper-M

Somewhere in the Scala documentation about postfix notation:

This may result in unexpected compile errors at best, and happily compiled faulty code at worst. Although the syntax is used by some DSLs, it should be considered deprecated, and avoided.

I personally don't know of any DSLs which can't live without postfix ops. On the other hand I've seen a lot of people become confused when their code stops compiling because of the poor interaction with semicolon inference. It's "hidden" behind an import/flag, but then again so are a couple of actually useful features, so people tend to just ignore that and try to use it anyway.
Why don't we just actually deprecate and drop it, while we're busy dropping things, and make Scala a little bit less confusing?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions