Skip to content

Deprecate spec-defined and standard-library-defined unicode operators (⇒, ←, →) #585

Closed
scala/scala
#7540
@smarter

Description

@smarter

From the spec:

The Unicode operators \u21D2 ‘⇒’ and \u2190 ‘←’, which have the ASCII equivalents => and <-, are also reserved.

And from the standard library:

  def [B](y: B): Tuple2[A, B] = ->(y)

While they're very cute, they're all likely to confuse users for very little benefits. And people who like symbols can simply use a coding font with special ligatures such as Fira Pro which does a much better job at solving this problem.

(It's also worth noting that → in particular is problematic because it doesn't have the same associativity as ->: scala/bug#11210)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions