https://kotlinlang.org logo
#announcements
Title
# announcements
g

gregd

07/21/2017, 1:24 PM
How come Swift can work without it? (I'm not mentioning JS, since it's a quite different story)
v

voddan

07/21/2017, 1:26 PM
Because in kotlin you can have a method
foo()
and a value
foo
in one scope (separate name spaces for functions and properties)
g

gregd

07/21/2017, 1:33 PM
Not sure if that convinces me actually. Looking at the direction in which the languages are heading, having hassle-free support for passing functions seems like a higher-priority IMO
e

elizarov

07/21/2017, 1:43 PM
You can always define
val foo = this::foo
in Kotlin and have hassle-free for both
foo(...)
invocations and passing
foo
around as a value. I’m not sure if that helps in your case, though.
g

gregd

07/21/2017, 1:51 PM
Thanks. I know that. But it's not hassle-free, since I have to define the property first 😉
I just see there's a clear trend towards Functional Programming recently, that's why I'm a bit concerned about Kotlin's not-ideal syntax for this.
e

elizarov

07/21/2017, 2:28 PM
I see a clear tread towards Functional Programming for the past 20 years. People who are older than me had reported seeing it for the past 40 years
When you are experienced developer, you don’t usually get confused by the code that freely mixes values and functions. It is a big challenge for novices, though. I do believe that Kotlin’s explicitness, that is a clear separation of functions and the fact that it does not have anything like Swift’s
autoclosure
is helping to make Kotlin code easier to read and understand for the less experienced crowd.
g

gregd

07/21/2017, 3:43 PM
Most people would probably say that 80's, 90's and early 2k's were all about OOP, but ok 😉
Let's just hope that at least
KT-15667
will make it into K 1.2
Anyways, I admire your hard work! Thanks! 👍 😄