Another thing to remember is that in Kotlin, unlike in Java, regular classes are final by default, which means they cannot be subtyped. To make a class open for subtyping, it has to be marked with the "open" modifier.
using @Nested inside the test class tip was awesome, most of the time naming test cases is difficult for me but by grouping them using @Nested, naming would be much easier and straight forward. great video by the way
This is a great video, but this video also embodies my biggest gripe with Kotlin. It feels like every potential feature that could maybe be useful in any circumstance was indiscriminately added to the language. Useful, yes, but it gives every single project a different feel and makes it difficult to find consistency, sometimes even within the same project. This is especially felt when using different libraries together.
I can understand that perspective - that's actually how I felt about Groovy. I found it to be a very capable language, but there were so many features and options - even blending dynamic and static typing - that it didn't seem to have a sense of direction, and I suspect even detracted from adoption. I'm hoping Kotlin will avoid _that_ level of feature sprawl - it's a good concern to keep in mind, for sure!
Just found your channel. Nice video: cleanly produced, smartly packaged, and thorough without being tedious. Thank you. Hmm, never used value classes before--talk about boilerplate code!!! That is sooooo awkward, just to catch a parameter error. But that's kotlin for you: tons of extra work in order to keep bad programmers from making mistakes. Give me plain ol C any day (or Lisp).
Can I just say after watching a few of your videos, I'm inspired to improve my vocabulary. Too often I use terminology inappropriately, and your usage makes it so much clearer to understand!
Hey, that's great, Aaron! And I appreciate you saying that - I do aim to use precise terms, and I'm so glad to hear it's helping to make things easier to understand!
8:20 I generally use sealed interfaces for that, because they don't store any state and are purely for grouping these sub-classes into a single type. Unfortunately, the youtrack issue KT-50630/Script-false-positive-NOELSEINWHEN-for-sealed-interface-hierarchy appeared and limits it in when clauses, which is kinda sad at the moment. I'd argue that sealed classes are to take when it needs to be scoped and have a common property, whereas interfaces should be used as a default.
Hey Dani! You can certainly learn Kotlin without knowing Java. Sometimes, knowing Java can be a bonus, and could be helpful if you wanted to use a Java library in Kotlin, for example. You're welcome to start learning Kotlin here: typealias.com/start. In that online book, I don't expect the reader to have any prior Java experience. There are a few occasions where I mention things that might be helpful for someone who is coming from Java, but that's about it. Let me know how it goes as you start learning Kotlin!
Yeah, I decided not to include `object` since it's not quite in the same category... e.g., you can create nested objects and data objects. Might have made a good honorable mention, though!
Another thing to remember is that in Kotlin, unlike in Java, regular classes are final by default, which means they cannot be subtyped. To make a class open for subtyping, it has to be marked with the "open" modifier.
Yes, thank you for pointing that out, Arthur!
Oo i love that!! Is “final class” a way of restricting inheritance a la Swift?
I like your presentation style, very succint and straight to the point
Great, thank you so much!
Yes! It also gives confidence to the learner that he’s in good hands 😁
using @Nested inside the test class tip was awesome, most of the time naming test cases is difficult for me but by grouping them using @Nested, naming would be much easier and straight forward. great video by the way
Thanks! Yeah, once I started using `@Nested` in those JUnit 5 tests, I really missed it on the occasions when I had to return to JUnit 4.
@@typealias When do you usually revert back to JUnit4? For me, it's usually when interacting with Roboelectric or such
I started combining this with Display name and the test output reads beautifully, specially with parametrized tests
I don't know where did you come up, but you're the great teacher a lot of us never had. Keep on the good work Dave :)
I appreciate that - thanks so much! I'll keep at it!
This is a great video, but this video also embodies my biggest gripe with Kotlin. It feels like every potential feature that could maybe be useful in any circumstance was indiscriminately added to the language. Useful, yes, but it gives every single project a different feel and makes it difficult to find consistency, sometimes even within the same project. This is especially felt when using different libraries together.
I can understand that perspective - that's actually how I felt about Groovy. I found it to be a very capable language, but there were so many features and options - even blending dynamic and static typing - that it didn't seem to have a sense of direction, and I suspect even detracted from adoption. I'm hoping Kotlin will avoid _that_ level of feature sprawl - it's a good concern to keep in mind, for sure!
Just found your channel. Nice video: cleanly produced, smartly packaged, and thorough without being tedious. Thank you.
Hmm, never used value classes before--talk about boilerplate code!!! That is sooooo awkward, just to catch a parameter error. But that's kotlin for you: tons of extra work in order to keep bad programmers from making mistakes. Give me plain ol C any day (or Lisp).
I really like your teaching style, thank you!
Thank you so much! I'm glad you like it!
Thank you soo much Dave, you are a gift to all beginners
Hey, you're welcome! It took a while to get around to it, but I appreciate you requesting this one!
I usually have a hard time when the examples are contrived, but yours are great : )
Thank you for saying that - I try my best to come up with examples that fit well!
Thank you so much Dave your tutorials are always helpful
Thank you so much! I'm glad you like them!
Can I just say after watching a few of your videos, I'm inspired to improve my vocabulary. Too often I use terminology inappropriately, and your usage makes it so much clearer to understand!
Hey, that's great, Aaron! And I appreciate you saying that - I do aim to use precise terms, and I'm so glad to hear it's helping to make things easier to understand!
8:20 I generally use sealed interfaces for that, because they don't store any state and are purely for grouping these sub-classes into a single type.
Unfortunately, the youtrack issue KT-50630/Script-false-positive-NOELSEINWHEN-for-sealed-interface-hierarchy appeared and limits it in when clauses, which is kinda sad at the moment.
I'd argue that sealed classes are to take when it needs to be scoped and have a common property, whereas interfaces should be used as a default.
Didnt expected it, but I learned few things on the way. TY!
That camera quality, voice and background. Wow
Hey, thanks so much, Ronny! Glad you're happy with the production quality!
super nice video, straight to point , also amazing voice and background, thanks a lot ❤
Greate Video, great illustration, great job, thanks Dave....easy to follow
The people who haven't subscribed to Dave are probably gonna miss a lot of things 😅
Nice video. Thanks
great video
thanks
Well done!
This is what I was looking for 😊🎉
Great stuff!
Awsm
Just pick Golang. no more confusion - done.
garbage
I wanted to learn kotlin, do I need to learn Java?
Hey Dani! You can certainly learn Kotlin without knowing Java. Sometimes, knowing Java can be a bonus, and could be helpful if you wanted to use a Java library in Kotlin, for example.
You're welcome to start learning Kotlin here: typealias.com/start. In that online book, I don't expect the reader to have any prior Java experience. There are a few occasions where I mention things that might be helpful for someone who is coming from Java, but that's about it. Let me know how it goes as you start learning Kotlin!
thumb up
Object?
Yeah, I decided not to include `object` since it's not quite in the same category... e.g., you can create nested objects and data objects. Might have made a good honorable mention, though!
Freshers can’t understand ur vdos