How come Swift can work without it? (I'm not menti...
# announcements
g
How come Swift can work without it? (I'm not mentioning JS, since it's a quite different story)
v
Because in kotlin you can have a method
foo()
and a value
foo
in one scope (separate name spaces for functions and properties)
g
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
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
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
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
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! 👍 😄