Hacker News new | past | comments | ask | show | jobs | submit login

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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: