It's one of the things I really like about scala, x call y is always equivalent to x.call(y)
This combined with relaxed method name restrictions allow you to do "operator overloading" in quite a sane way and allow you to write bigint + 1 or set contains element.
Kotlin is a bit more conservative and only translated the built-in operators to fixed methods: + to the plus method etc.
This combined with relaxed method name restrictions allow you to do "operator overloading" in quite a sane way and allow you to write bigint + 1 or set contains element.
Kotlin is a bit more conservative and only translated the built-in operators to fixed methods: + to the plus method etc.