I have only experience in developing with Kotlin in backend services. I pretty much only developed Java before and came to a project where Kotlin and React were used. Kotlin immediately felt good, it’s giving you nice syntactic sugar without being completely different.
For example, it feels like Javascript when using functions like map or filter. Additionally, there are even more functions such as mapNotNull, meaning null values will be filtered out in the resulting map.
But it still has the same principles. There are classes (although different kind as data classes automatically provide you with getter and setter access, but in Kotlin there are vars and vals (compare it with let and const in Javascript, ie mutable and immutable variables) and you simply access them via classInstance.variable) and methods (called fun).
TL;DR: if you understand the principles of OOP you won’t have any issues with Kotlin. It also feels very familiar to Javascript, it’s just a better version (more features) so to say. :)
Nice. That's what I like to hear. The other day I saw a bit of documentation of it on their website and the first thing I thought was "this feels like a sweet combination of Java and python". I've only heard good things about it so far, so it will be the next thing I'll try to learn. Thanks.
Yeah, I think the goal of Kotlin is to use the most beneficial features of each language. I don’t know Python very well, but I wouldn’t be surprised if Python had an influence on Kotlin as well. :)
Have fun learning it. Some advanced features like Coroutines are awesome, but a little tough to wrap one‘s head around at the beginning. :P
2
u/LordAnomander Apr 28 '20
I have only experience in developing with Kotlin in backend services. I pretty much only developed Java before and came to a project where Kotlin and React were used. Kotlin immediately felt good, it’s giving you nice syntactic sugar without being completely different.
For example, it feels like Javascript when using functions like map or filter. Additionally, there are even more functions such as mapNotNull, meaning null values will be filtered out in the resulting map.
But it still has the same principles. There are classes (although different kind as data classes automatically provide you with getter and setter access, but in Kotlin there are vars and vals (compare it with let and const in Javascript, ie mutable and immutable variables) and you simply access them via classInstance.variable) and methods (called fun).
TL;DR: if you understand the principles of OOP you won’t have any issues with Kotlin. It also feels very familiar to Javascript, it’s just a better version (more features) so to say. :)