Hacker News new | ask | show | jobs
by still_grokking 1258 days ago
> 1. Lambda functions can be defined with {}.

Directly "stolen" form Scala.

> 2.foo(bar, somefunc) is the same as foo(bar) somefunc. In other words, if the last parameter is a function, it can be provided AFTER closing parenthesis.

Just a irregular syntax quirk that tries to get around the fact that Kotlin does not support multiple parameter lists, like the language where most Kotlin features come form, Scala.

> 3. Interfaces that require only one method can be implemented on-side with a lambda function (i.e. {} syntax for no-param function).

That doesn't have anything to do with Kotlin. That's Javas SAM (Single Abstract Method) feature.

> I'm surprised author didn't mention it.

The author seems not to know any Scala. Otherwise the lists would show mostly only Scala features… ;-)