I was so excited after the first "takeaway" and started thinking that I need to watch the video to the end and then later to show it somebody else to discuss. Compile time error NPE check is really strong feature. I think in java it can be done by extending the pom.xml with some extra plugins (I am pretty sure). I would really like to have it built in. Others "takeaways" are more like a syntax sugar or features that incline you, or even forgive you when you write poorly designed code (I mean the method overloading + default values). I don't want to offend some touchy software engineers but I see only one strong argument here (takeaway#1) and I don't see how it convinces the "business" to start using it. I am talking only about enterprise level java I am not sure how it works in android world. Thanks author anyway!
Hi and thanks for the feedback! I guess I set the bar too high with the first takeaway and it is of course Kotlin's main selling point over Java (especially to the business). However, from my experience devs tend to underestimate the power and fun that comes from this syntax sugar. It's just more fun to code in Kotlin than Java and it opens up and provides more freedom to developers. I've had great success convincing the business (in a big bank) to switch to Kotlin by mentioning that it's interoperable with Java so you don't need to rewrite all the code at once. Of course Kotlin has many more feature that unfortunately did not fit into my 20 min talk ;)
@@Seppjos This is exactly what I did too at my work too when convincing them to move to Kotlin (I work in a big Bank too in Australia). All business wants to hear is that developers prefer it, that it's interoperable with Java and that it will reduce development time.
I am a C# programmer, but this looks WAY better than Java. Saying "it's just syntactic sugar" is like saying tha async/await is only sugar - which in reality it is just that, but it is SO MUCH better than callbacks. Embrace Kotlin, seems like a great lnaguage to work in!
@@Qrzychu92 Exactly! I like java hut I'm not right like some java and ja fanboys. Around 2018 when I started using Kotlin in my Android project it say immediate changes the code readability and concise Kotlin syntax. The sugarcoat thse java fanboys talk about is actually kotlin frontend in it's syntax and it made it that way to concise things and make code more readable. Now I'm using Kotlin In Spring boot project and so far it's a wonderful experience... Java developers don't need to hate kotlin because it's just better java. I myself defend java when js developer don't understand Java design principles, OOPs & SOLID principles but I don't blindly say java is good with everything...
18:24 I"ve indeed come across snippets/repos out there that still write them manually in Kotlin, with lots of clout, because, well, it was aesthetically highlighted
#8 is not a good example in my opinion : when you read "four < five" you don't what the comparison is based on. To understand what is going on, you have to read all the code to see where "compareTo" is defined. "four.releasedBefore(five)" would be a much better way to write this so that it's easier for the reader to understand.
I still don't get it why people are still saying kotlin is just a sugarcoat and nothing else. You just need to see last slides and it sums up everything. "Kotlin isn't just fancy syntax, it's a different kind of programming"
Spring has recently released `andExpectAll` for its `ResultActions` API, so it's slightly less annoying now to make sure all assertions are reported when at least one fails.
#9 is also not good in my opinion. The strategy pattern is still useful, and what is presented is not a good use of the pattern. The strategy pattern is not about implementing interfaces. And implementing a FlyBehaviour with "I cannot fly" makes no sense : if you cannot fly, you don't implement the FlyBehaviour. That being said, delegation is super handy, but we have to find another argument to sell it ;-)
Bruh this love for the language is everywhere 🤦. JS developers are also lole that. Why can't you simple use everything it's not hard to code in these languages. Just use things what works best for the current solution instead of favouring any language...
@@deepakbisht4957 There are examples where one language is at least as good as another one in every regard. Kotlin is as good as Java or better in all regards, TypeScript is superior to JavaScript. There are silly language wars like C# vs Java, where it's not clear which one is better, but in some cases it just is.
This feels like it was created by a 1st year comp sci major that listened to their favourite influencer about java bad Nullability is the only thing Kotlin has over Java and maybe I've not written enough java to get frustrated (I have) but getting null pointer errors, in 2024, with powerful IDEs is most definitely a skill issue. Extension functions in large code bases make code unreadable. Good luck finding the definition when you're not viewing from an IDE The only major difference between factory pattern and the Kotlin code is ... literally nothing. The Kotlin code eventually does the same thing the factory pattern does. Is your definition of Obsolete ... reinventing the wheel? Again, the DSL shown isn't that much different from the Java code. The maps? They look almost the same. Why was that even added? Lol Iterator? Just use Streams? Think of the reader, and not the writer? If I'm reading a code from an intern, and I see four < five, and four and five are not numbers, they're getting queried because how does that even make any sense?? Giving it actual movie names to makes no sense either from a readbility POV. It's much more readable if you do something like .premieredBefore(). Being fancy doesn't mean readability For the strategy pattern, why didn't you put all the kotlin code in one screen like you did for Java? You're not trying to exploit some human bias right? Right? Almost like you're trying to trick your viewers into reinforcing the believe that java is more verbose (which is right but not in this scenario). Did you intentionally try to make the java code more verbose? The final keyword isn't needed. The public keyword isn't needed since the class is package private. Given the context, instantiating a new Behvaiour isn't needed either. new BehaviorTypeHere().fly() in the fly method would have been enough Istg the only people that love kotlin are those that like to feel "smart" or "fancy when coding. Kotlin is just good PR team. If you're gonna hate on Java, at least bring up Golang. Apple didn't choose kotlin as the main language for their new language lol This was fun to do. Good video. Now I go back to writing stupid c# so I can have somewhere to live
I almost cannot believe that operator overloading was followed by think about the reader :D the example given is a way to brainfuck everyone reading it, even yourself after 3 months away. Saying movie1 < movie2 has a huge question mark of what you are even comparing. Year of release, number of cast members, movie rating, etc?
It's not a question mark it's just you are restricting your mind to compare only primitive numbers like int or something but it's OOPs and we should think like that way and create our own objects and operate them according to the real world things...
@@deepakbisht4957 This was two months ago, reading the comment and seeing movie1 < movie2, I have no idea wtf it's comparting xD It's not about restricting your mind, it is about information hiding and context dependence, that is bespoke to your program, not to mention, that you can never change it in case you were wrong the first time. I can easily imagine two movie codebases, that use same operators for different purpose. And that is incredibly shitty reading experience.
Quite a few things actually existed in C# many years ago. But what does it matter, if langauges didn't learn from other languages and take what's good here and there, we would have langauges so seperated that evolve way slower
Sure most things have been stolen, but unfortunately you're incorrect: Scala still doesn't even have #1 from the talk non-nullable types and nullable types with compiler-check, you have to do it the tedious way like Java and wrap with Optionals.. Scala is great but such a pain to code in sometimes
Straight to the point, easy to remember, easy to apply IRL. 😊
I was so excited after the first "takeaway" and started thinking that I need to watch the video to the end and then later to show it somebody else to discuss.
Compile time error NPE check is really strong feature. I think in java it can be done by extending the pom.xml with some extra plugins (I am pretty sure). I would really like to have it built in.
Others "takeaways" are more like a syntax sugar or features that incline you, or even forgive you when you write poorly designed code (I mean the method overloading + default values).
I don't want to offend some touchy software engineers but I see only one strong argument here (takeaway#1) and I don't see how it convinces the "business" to start using it.
I am talking only about enterprise level java I am not sure how it works in android world.
Thanks author anyway!
Hi and thanks for the feedback!
I guess I set the bar too high with the first takeaway and it is of course Kotlin's main selling point over Java (especially to the business).
However, from my experience devs tend to underestimate the power and fun that comes from this syntax sugar.
It's just more fun to code in Kotlin than Java and it opens up and provides more freedom to developers.
I've had great success convincing the business (in a big bank) to switch to Kotlin by mentioning that it's interoperable with Java so you don't need to rewrite all the code at once.
Of course Kotlin has many more feature that unfortunately did not fit into my 20 min talk ;)
@@Seppjos This is exactly what I did too at my work too when convincing them to move to Kotlin (I work in a big Bank too in Australia). All business wants to hear is that developers prefer it, that it's interoperable with Java and that it will reduce development time.
I am a C# programmer, but this looks WAY better than Java. Saying "it's just syntactic sugar" is like saying tha async/await is only sugar - which in reality it is just that, but it is SO MUCH better than callbacks. Embrace Kotlin, seems like a great lnaguage to work in!
@@Qrzychu92
Exactly!
I like java hut I'm not right like some java and ja fanboys.
Around 2018 when I started using Kotlin in my Android project it say immediate changes the code readability and concise Kotlin syntax.
The sugarcoat thse java fanboys talk about is actually kotlin frontend in it's syntax and it made it that way to concise things and make code more readable.
Now I'm using Kotlin In Spring boot project and so far it's a wonderful experience...
Java developers don't need to hate kotlin because it's just better java.
I myself defend java when js developer don't understand Java design principles, OOPs & SOLID principles but I don't blindly say java is good with everything...
18:24
I"ve indeed come across snippets/repos out there that still write them manually in Kotlin, with lots of clout, because, well, it was aesthetically highlighted
Optional is even funnier becauses it causes NullPointerException as well as ArrayIndexOutOfBoundsException.
Fantastic talk 👏 This is now going to be one of my go to videos when training the Java Devs in Kotlin at work!
#8 is not a good example in my opinion : when you read "four < five" you don't what the comparison is based on. To understand what is going on, you have to read all the code to see where "compareTo" is defined. "four.releasedBefore(five)" would be a much better way to write this so that it's easier for the reader to understand.
yeah, the example was not the best one. but i guess this was just to illustrate the feature.
I wonder what “looking OO (Object-Oriented)” means.
Java version of factory method expresses the programmers intention clearly than the Kotlin version
I still don't get it why people are still saying kotlin is just a sugarcoat and nothing else.
You just need to see last slides and it sums up everything.
"Kotlin isn't just fancy syntax, it's a different kind of programming"
So kotlin is basically a scala with a good marketing...
Nope it's a programming with fun.
Best for the java developers. They don't need to hate kotlin. They should just try to use it...
No. Kotlin is Scala without the nice things ;) (quoting Andrey Breslav's "Standing on the shoulders of giants" talk)
Spring has recently released `andExpectAll` for its `ResultActions` API, so it's slightly less annoying now to make sure all assertions are reported when at least one fails.
#9 is also not good in my opinion. The strategy pattern is still useful, and what is presented is not a good use of the pattern. The strategy pattern is not about implementing interfaces. And implementing a FlyBehaviour with "I cannot fly" makes no sense : if you cannot fly, you don't implement the FlyBehaviour.
That being said, delegation is super handy, but we have to find another argument to sell it ;-)
Why Kotlin users always spit on Java ? Just move on, and appreciate Kotlin features
That's just our PTSD speaking, which kicks in once you overcome the Stockholm syndrome.
Bruh this love for the language is everywhere 🤦.
JS developers are also lole that. Why can't you simple use everything it's not hard to code in these languages. Just use things what works best for the current solution instead of favouring any language...
@@deepakbisht4957 There are examples where one language is at least as good as another one in every regard. Kotlin is as good as Java or better in all regards, TypeScript is superior to JavaScript. There are silly language wars like C# vs Java, where it's not clear which one is better, but in some cases it just is.
Any superset technology has to be mentioned with respect to its now-inferior predecessor.
This feels like it was created by a 1st year comp sci major that listened to their favourite influencer about java bad
Nullability is the only thing Kotlin has over Java and maybe I've not written enough java to get frustrated (I have) but getting null pointer errors, in 2024, with powerful IDEs is most definitely a skill issue.
Extension functions in large code bases make code unreadable. Good luck finding the definition when you're not viewing from an IDE
The only major difference between factory pattern and the Kotlin code is ... literally nothing. The Kotlin code eventually does the same thing the factory pattern does. Is your definition of Obsolete ... reinventing the wheel?
Again, the DSL shown isn't that much different from the Java code.
The maps? They look almost the same. Why was that even added? Lol
Iterator? Just use Streams?
Think of the reader, and not the writer? If I'm reading a code from an intern, and I see four < five, and four and five are not numbers, they're getting queried because how does that even make any sense??
Giving it actual movie names to makes no sense either from a readbility POV. It's much more readable if you do something like .premieredBefore(). Being fancy doesn't mean readability
For the strategy pattern, why didn't you put all the kotlin code in one screen like you did for Java? You're not trying to exploit some human bias right? Right? Almost like you're trying to trick your viewers into reinforcing the believe that java is more verbose (which is right but not in this scenario).
Did you intentionally try to make the java code more verbose? The final keyword isn't needed. The public keyword isn't needed since the class is package private. Given the context, instantiating a new Behvaiour isn't needed either. new BehaviorTypeHere().fly() in the fly method would have been enough
Istg the only people that love kotlin are those that like to feel "smart" or "fancy when coding.
Kotlin is just good PR team. If you're gonna hate on Java, at least bring up Golang. Apple didn't choose kotlin as the main language for their new language lol
This was fun to do. Good video. Now I go back to writing stupid c# so I can have somewhere to live
I almost cannot believe that operator overloading was followed by think about the reader :D the example given is a way to brainfuck everyone reading it, even yourself after 3 months away. Saying movie1 < movie2 has a huge question mark of what you are even comparing. Year of release, number of cast members, movie rating, etc?
It's not a question mark it's just you are restricting your mind to compare only primitive numbers like int or something but it's OOPs and we should think like that way and create our own objects and operate them according to the real world things...
@@deepakbisht4957 This was two months ago, reading the comment and seeing movie1 < movie2, I have no idea wtf it's comparting xD
It's not about restricting your mind, it is about information hiding and context dependence, that is bespoke to your program, not to mention, that you can never change it in case you were wrong the first time. I can easily imagine two movie codebases, that use same operators for different purpose. And that is incredibly shitty reading experience.
All these things kotlin stole from scala. Wow such revolutionary
Scala didn't invent those either
@@guai9632 not all of them, but many
none at all
Quite a few things actually existed in C# many years ago. But what does it matter, if langauges didn't learn from other languages and take what's good here and there, we would have langauges so seperated that evolve way slower
Sure most things have been stolen, but unfortunately you're incorrect: Scala still doesn't even have #1 from the talk non-nullable types and nullable types with compiler-check, you have to do it the tedious way like Java and wrap with Optionals.. Scala is great but such a pain to code in sometimes
Map.of() hit me