Комментарии:
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?
Ответить#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 ;-)
#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.
ОтветитьOptional is even funnier becauses it causes NullPointerException as well as ArrayIndexOutOfBoundsException.
ОтветитьSo kotlin is basically a scala with a good marketing...
ОтветитьWhy Kotlin users always spit on Java ? Just move on, and appreciate Kotlin features
Ответить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.
ОтветитьI wonder what “looking OO (Object-Oriented)” means.
Ответить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!
Fantastic talk 👏 This is now going to be one of my go to videos when training the Java Devs in Kotlin at work!
ОтветитьAll these things kotlin stole from scala. Wow such revolutionary
Ответить