Is Either<String, Int> in kotlin similar to union types in typescript?
@jaykavanaugh464816 сағат бұрын
I have zero understanding of wrestling so this presentation is very confusing to me.
@jante-adebowale2 күн бұрын
Excellent!
@alphabe-j1n3 күн бұрын
Dave we loove you
@vikramragunathan63923 күн бұрын
Wonderfully explained :)
@Talaria.School5 күн бұрын
super topics, thanks! The books he wrotes is a gem : Functional Programming Ideas for the Curious Kotliner.
@elzearcontelly26515 күн бұрын
At 4:00, the code on the left is actually incorrect: the `catch(e: Exception)` will catch CoroutineCancellationException, which will create a zombie coroutine-the update will fire even though the coroutine is cancelled. Arrow's catch doesn't have this bug, it correctly cancels the current function when the child is cancelled
@typealias3 күн бұрын
Ah yeah, thanks for pointing that out. It's so easy to forget about rethrowing those cancellation exceptions!
@vancedsyahrul70597 күн бұрын
hi, i from indonesia
@leonardlemke7 күн бұрын
Thank you so much for your helpful videos! I’ve come across some shortcuts in other tutorials that I wasn’t familiar with, and it would personally help me a lot if the shortcuts were displayed on screen-perhaps using the Presentation Assistant or any other plugin of your choice. That way, I wouldn’t just learn about the video’s topic but also improve my overall workflow with the IDE. Keep up the great work!
@typealias7 күн бұрын
Thanks so much, Leonard! I'm glad you've found the videos helpful. I've had a lot of folks asking about this, so I covered all of my main keyboard shortcuts in one video - you can jump straight to the segment by using this link: kzbin.infofcul4vIbqiI?feature=shared&t=1557
@leonardlemke7 күн бұрын
@@typealiasI’ve already spent the whole day watching your videos, but I haven’t made it to the live streams yet-thanks for the hint!
@KuroKazeZX8 күн бұрын
this was amazing
@androidexpert73198 күн бұрын
Dave is an amazing story teller and teacher. Thanks for this video
@aungkhanthtoo76789 күн бұрын
I love your code using Either type only in the view model class. Today, most people use Either type extensively in API service and Dao classes, making them redundant unwrapping of Either when they want to orchestrate data from multiple sources in repository class that obscure readability of the domain logic flow.
@typealias7 күн бұрын
Yes, thanks! It's been helpful to get some perspectives about the most helpful situations for using Either. Sounds like it can work well when we need to preserve the exceptions... but I can also definitely see how it could get out of hand if everything has to be unwrapped all the time.
@typealias9 күн бұрын
Hey there! This episode continues in part 2 - kzbin.infowIRYXciUZps - Usually we get the full show in one stream, but our streaming platform dropped out on us in the middle. Thanks for watching!
@devopsthinh10 күн бұрын
Happy lunar new year, from Vietnam 😊😘
@typealias9 күн бұрын
Hey, happy lunar new year to you also! Hope all is going well for you in Vietnam!
@Mannodermaus210 күн бұрын
Congrats on 10k! ♥ Very deserved, this is the best content on Kotlin out there at the moment.
@typealias9 күн бұрын
Hey, thanks so much! We're thrilled to hit the milestone. And big thanks to you and everyone else who subscribed to make that happen!
@parano-ID9 күн бұрын
10k wtf i noticed just now i assumed its a big channel just by looking at quality
@typealias9 күн бұрын
Yeah - only 10k! We're still growing, but glad you find the quality on par with the bigger channels!
@CHOCHY10 күн бұрын
Great video, great work 🎉
@ЕгорМазур-х1с15 күн бұрын
Congratulations on 10k subscribers!
@typealias15 күн бұрын
Hey, thank you so much! Excited to hit the big milestone! 🎉
@capitola16 күн бұрын
you are awesome
@jacshad17 күн бұрын
Dave, I found your channel recently and am already a big fan. I was curious to see you don't use code completion/autocomplete in IntelliJ, is that on purpose?
@typealias17 күн бұрын
Hey, thanks so much, Jacqui - glad you're here! Yes, in my normal day-to-day coding, I keep those autocomplete menus turned on, but when filming videos, I noticed that they end up being more distracting than helpful. For example, they often end up covering the next or previous lines while I'm still talking about them. So for recording, I turn them off and only pop them up manually when I want to show them on the video.
@codingCouncil18 күн бұрын
hey dave , couldn;t we have just handled the special request.amount condition inside the RefundRequest branch itself ? fun receive(request: Request) { when (request) { is OrderRequest -> Warehouse.fulfillOrder(request) is RefundRequest -> { if (request.amount < 10) { println("Automatically refunded") } else { Warehouse.fulfillRefund(request) } } is SupportRequest -> HelpDesk.handle(request) } } Are there are pros and cons here . I didn't fully grasp the need of the guard conditions
@typealias16 күн бұрын
Hey CodingCouncil! That would work, but the disadvantage is that the compiler won't tell you when you haven't been exhaustive (at least, when it's a `when` statement rather than a `when` expression). For example, you could accidentally omit the `else` branch, and the compiler wouldn't tell you. On the other hand if you were to omit the else branch with a pattern guard like this... when (request) { is OrderRequest -> Warehouse.fulfillOrder(request) is RefundRequest if(request.amount < 10) -> println("Automatically refunded") // missing `is RefundRequest -> ...` here is SupportRequest -> HelpDesk.handle(request) } ... then you'll get a compiler error because it knows that you haven't been exhaustive. So, it works to write the code either way, but it's a matter of how much support you get from the compiler.
@isidrorodriguez283318 күн бұрын
This is gold! Best video I've seen about coroutines.
@o_radar_o417419 күн бұрын
Besides all these syntactic sugar it's simple OOP: an abstract User class with some concrete implementations
@viablesubtlety20 күн бұрын
Facts
@mustafabektas720721 күн бұрын
Hi Dave, kind of a weird question but my friend and I found your website by chance. And we stumbled upon the Turkish translation (named as Turki) of the first chapter of Dave Leeds on Kotlin. Its translation is both amazingly cool and funny as hell. Its translation has heavy Ottoman era word usage, and we have been trying to figure out who or what translated it? Is it AI, if so which AI, or is it a legendary person who knows Ottoman Turkish? Would be great if you can address our curiosity. It's really great. I don't think we have ever seen such a good use of Ottoman Turkish in a programming course material :)
@typealias21 күн бұрын
Hey Mustafa! Wow, that's so funny! I'll have to ask the Turkish translator... part of the translator agreement is to not submit translations that have been run through a translation service or AI, except for occasional help with individual sentences. So maybe he's just an Ottoman era legend! Now it makes me want to add a Middle English translation of Chapter 1!
@Khaled_Ahmed_Elsayed22 күн бұрын
I just discovered your channel, this is some nice treasure for Kotlin devs out here, totally subscribed
@typealias22 күн бұрын
Hey, thanks so much, Khaled! Glad you're here! 🎉
@ArthurKhazbs23 күн бұрын
Surely something to reflect on! :)
@safronio23 күн бұрын
Great video, as usual - golden standard of programming tutorials! Thank you 🙏
@typealias22 күн бұрын
Very kind of you to say that, Sergey! Thanks so much!
@ceejayszee23 күн бұрын
Fantastic video! As a Flutter developer mainly, this was very easy and fun to understand and learn, thank you!
@stasleonov519623 күн бұрын
Thank you very much for your work, I accidentally came across your channel, found gold
@typealias23 күн бұрын
You're most welcome, Stas! I'm glad you've been enjoying it!
@MrTASouza24 күн бұрын
Amazing content as always!
@artembondar761924 күн бұрын
Nice video! Why did they choose this magic number 22 for the amount of parameters for a function?
@typealias23 күн бұрын
I haven't seen any limits in the JVM that would make it a necessary choice, so I believe it's an arbitrary number. I suspect it was following after Scala's choice for the same thing, but @AntonArhipov might have more insight.
@kedarpanse482724 күн бұрын
Great information Dave. Coming from java I always wondered about the "K" types. This is definitely helpful understanding the concept. Keep up the good work!
@typealias23 күн бұрын
Thanks so much, Kedar! I'll keep at it!
@F776-b2s24 күн бұрын
I'm mindblown. Excellent content as always, I've learnt a lot from you
@AntonArhipov24 күн бұрын
Great deep dive! ;)
@romanivanov30624 күн бұрын
Thanks, great video, as always! And amazing typing speed))
@typealias24 күн бұрын
Thanks so much! Typing speed and accuracy are definitely aided by some automation and refined in post-production. I can't type that fast most of the time. 😅
@fabiovokrri51724 күн бұрын
I really enjoy the way you explain kotlin concepts. Hope you the best
@typealias24 күн бұрын
Thanks so much, Fabio! Wishing the best to you, as well!
@daver9424 күн бұрын
Thanks Dave! ❤
@cookiedev835524 күн бұрын
We enjoy your videos at my workplace, hope this channel starts getting some more momentum its kotlin gold! Algo will take off with it soon. Also, would be super cool to see some videos about the Kotlin Compiler, maybe something touching the FIR. KSP resources are also lacking to the quality of your videos, and we utilize it for some cool use cases. Appreciate the effort!!!
@typealias24 күн бұрын
Hey, thanks so much! Glad to hear you all have been enjoying the videos. We're closing in on 10k subscribers soon! Good ideas about compiler/FIR, and KSP... I'll add those to my running list of video topic ideas. 👍
@_MrKekovich24 күн бұрын
I love the language and your content. Thank you!
@typealias24 күн бұрын
Thank you! Yes, it's a great language!
@simonfrancisco724 күн бұрын
Just leaving a comment to support the channel, many thanks for your work!
@typealias24 күн бұрын
Hey thanks so much for that, Simon! Glad you've been enjoying it!