Dave Leeds
Dave Leeds
  • 39
  • 238 153
Guards and Pattern Guards - TypeAlias Show Clip
In this 9-minute clip from the TypeAlias Show Livestream, we look at the new pattern guards preview feature in Kotlin 2.1.
✨ New to Kotlin? Start your journey here: typealias.com/start/
... or pick up the PDF Edition for offline access and more! shop.typealias.com/
🚀 Get the inside scoop on everything I'm working on - join my new email newsletter!
Sign up here: newsletter.typealias.com/
🎞️ Watch the full episode here:
ua-cam.com/users/liveCPHi-5Wxp0o
📚 Chapters
00:00 General and Specific Terms
00:45 Guards in General
02:18 Guards in Swift
03:03 Pattern Guards in Kotlin 2.1
07:03 My Thoughts about Guards in Kotlin 2.1
Переглядів: 2 545

Відео

Immutable and Persistent Lists - TypeAlias Show Clip
Переглядів 2,4 тис.Місяць тому
In this 12-minute clip from the TypeAlias Show Livestream, we look at the kotlinx.collections.immutable library. ✨ New to Kotlin? Start your journey here: typealias.com/start/ ... or pick up the PDF Edition for offline access and more! shop.typealias.com/ 🚀 Get the inside scoop on everything I'm working on - join my new email newsletter! Sign up here: newsletter.typealias.com/ 🎞️ Watch the full...
Anonymous Functions Aren't Lambdas
Переглядів 4,3 тис.Місяць тому
Rarely spotted in the wild, Kotlin's anonymous functions blend some features of named functions with some features of lambdas. In this video, we'll check out what anonymous functions are and when we might want to use them. ✨ New to Kotlin? Start your journey here: typealias.com/start/ ... or pick up the new Leanpub Edition for offline access and more! book.typealias.com/ 🚀 Get the inside scoop ...
Fun with Function Types in Kotlin
Переглядів 4,1 тис.Місяць тому
Let's look at the different kinds of function types in Kotlin, and see how we can call regular functions - and even property setters - as if they were extension functions! In this video, we'll examine standard function types, extension function types, bound references, and property references - and we'll pick up some fun tricks along the way! ✨ New to Kotlin? Start your journey here: typealias....
Subtyping Composables - TypeAlias Show Clip
Переглядів 3,2 тис.2 місяці тому
"If you want to create a design system in Compose where we use a slot API that doesn't allow any composable but only allows specific ones, how would you do that?" Here's one idea that worked for me, and I'd love to hear your thoughts about it! ✨ New to Kotlin? Start your journey here: typealias.com/start/ ... or pick up the new Leanpub Edition for offline access and more! book.typealias.com/ 🚀 ...
Applying the Builder Pattern in Kotlin
Переглядів 5 тис.2 місяці тому
The Builder design pattern enables us to construct complex objects in multiple steps. But how much of it is relevant for a modern programming language like Kotlin? In this video, we'll see a traditional version of the Builder Pattern, and then we'll see how we can improve upon it with Kotlin's language and library features. ✨ New to Kotlin? Start your journey here: typealias.com/start/ ... or p...
Applying the Factory Method and Abstract Factory Patterns in Kotlin
Переглядів 6 тис.3 місяці тому
Make object creation more flexible with the Factory Method and Abstract Factory design patterns! Today, we'll look at code that could benefit from these patterns, we'll apply a traditional version of them from the classic Gang of Four Design Patterns book, and then we'll see how we can modernize them with Kotlin's language features. ✨ New to Kotlin? Start your journey here: typealias.com/start/...
Applying the State Pattern in Kotlin
Переглядів 8 тис.4 місяці тому
When our objects behave differently in different states, then it can be helpful to apply the State Pattern. Today, we'll look at code that could benefit from the State Pattern, we'll apply a traditional State Pattern from the classic Gang of Four Design Patterns book, and then we'll see how we can modernize it and reduce boilerplate by using some of Kotlin's language features. ✨ New to Kotlin? ...
Applying the Decorator Pattern in Kotlin
Переглядів 6 тис.4 місяці тому
The Decorator Pattern allows us to augment the behavior of an object - without the object itself knowing about it! In this video, we'll start with code that could benefit from this pattern. Then we'll apply the Decorator Pattern using the classic approach as outlined in the original Gang of Four book. Finally, we'll modernize the pattern using some of Kotlin's language features. ✨ New to Kotlin...
Applying the Strategy Pattern in Kotlin
Переглядів 9 тис.5 місяців тому
The strategy pattern is one of my favorites from the original Design Patterns book. In this video, we'll see why the strategy pattern is helpful, we'll apply the pattern in Kotlin, and then we'll see how we can use some of Kotlin's language features to put a more modern spin on it. ✨ New to Kotlin? Start your journey here: typealias.com/start/ ... or pick up the new Leanpub Edition for offline ...
Coroutines: Concurrency in Kotlin
Переглядів 21 тис.5 місяців тому
Coroutines: Concurrency in Kotlin
Kotlin Code Reuse: Composing like you're Inheriting
Переглядів 12 тис.5 місяців тому
Kotlin Code Reuse: Composing like you're Inheriting
7 Features in Kotlin's Standard Library that You Might Have Overlooked
Переглядів 8 тис.6 місяців тому
7 Features in Kotlin's Standard Library that You Might Have Overlooked
Reified Type Parameters
Переглядів 4,8 тис.6 місяців тому
Reified Type Parameters
The Essence of Coroutines
Переглядів 14 тис.7 місяців тому
The Essence of Coroutines
Looking Forward to Kotlin 2.0
Переглядів 18 тис.7 місяців тому
Looking Forward to Kotlin 2.0
Three Simple Rules for Subtypes
Переглядів 3 тис.8 місяців тому
Three Simple Rules for Subtypes
Inline Functions: inline, crossinline, and noinline
Переглядів 7 тис.8 місяців тому
Inline Functions: inline, crossinline, and noinline
Every Kind of Class in Kotlin
Переглядів 17 тис.9 місяців тому
Every Kind of Class in Kotlin
Type Projections... and why they work!
Переглядів 4,2 тис.9 місяців тому
Type Projections... and why they work!
Variance... without Generics!
Переглядів 8 тис.10 місяців тому
Variance... without Generics!
New HexFormat Tooling in Kotlin 1.9
Переглядів 2,1 тис.10 місяців тому
New HexFormat Tooling in Kotlin 1.9
Intersection Types in Kotlin
Переглядів 4,4 тис.11 місяців тому
Intersection Types in Kotlin
Try-Catch vs. runCatching()
Переглядів 4,9 тис.11 місяців тому
Try-Catch vs. runCatching()
A Tour Through Konsist with Igor Wojda
Переглядів 2,3 тис.Рік тому
A Tour Through Konsist with Igor Wojda
How to Use Kotlin's Timing API
Переглядів 3,9 тис.Рік тому
How to Use Kotlin's Timing API
Wall Clocks vs. Monotonic Clocks
Переглядів 2,6 тис.Рік тому
Wall Clocks vs. Monotonic Clocks
Intro to Collection Builders in Kotlin
Переглядів 4,8 тис.Рік тому
Intro to Collection Builders in Kotlin
Smart Casts with Kotlin Contracts
Переглядів 8 тис.Рік тому
Smart Casts with Kotlin Contracts
Easy SharedPreferences with Delegated Properties in Kotlin
Переглядів 9 тис.2 роки тому
Easy SharedPreferences with Delegated Properties in Kotlin

КОМЕНТАРІ

  • @blackdoom_
    @blackdoom_ 3 дні тому

    thank god, a person who explains a complicated topic in plain english without an incomprehensible damn accent

  • @athardavid
    @athardavid 3 дні тому

    Swift export looks promising

  • @yanivkremer3944
    @yanivkremer3944 3 дні тому

    Hi, I saw that your website has all 20 chapters for free. Why buy the book in PDF? I would like to know if there are any other things in it besides the chapters that are advertised for free. Thanks

    • @typealias
      @typealias 3 дні тому

      Hey Yaniv, thanks for asking! - With the PDF edition, you can read the book offline and mark it up with highlights and notes, by using your PDF software of choice. - It also includes a table of contents and an index, each of which links to the topics. - I also just recently finished updating all of the drawings and annotated code snippets in the PDF so that they're now using vector illustrations, so you can zoom in without losing any quality. - Once I get done with a few more small clean-up tasks, I'm expecting to also add a bonus Question-and-Answer section to each chapter, which would be exclusive to the PDF and print editions. Previously, the PDF edition also gave early access to new chapters, but of course, now that all 20 are complete, there aren't any more chapters to get early access to. 🙂 Hope that helps - let me know if you have any other questions!

    • @yanivkremer3944
      @yanivkremer3944 3 дні тому

      @@typealias Thanks for your answer. I would like to know: If I buy the PDF now. Will I receive updates of it when you finish with the bonus questions?

    • @typealias
      @typealias 2 дні тому

      Yes, whether you pick it up on Leanpub or on Fourthwall, you'll get access to the updates as I make them. With Leanpub, I only send email notifications about updates at particular milestones. With Fourthwall, you'll just get an email directly each time I push a new version. To get a feel for the frequency of updates I've made so far, you can see the release history on Leanpub here: leanpub.com/kotlin-illustrated - just scroll down to the "Release Notes" section. If you're on the fence about it, you could consider picking it up on Leanpub - they let you refund it within 60 days if it doesn't meet your expectations. So, if you're not seeing updates as quickly as you like, or if the upcoming Q&A sections aren't helpful for you, you could get a refund. Alternatively, you could just hold out another 4-6 weeks... I'm aiming to complete both the PDF and print editions within that timeframe. If you pick up the PDF on Leanpub at that point, you'd see the full set of bonus material and you could decide if you'd like to keep it.

  • @orghaniian
    @orghaniian 6 днів тому

    You have an opt-out option on your UA-cam channel that automatically translates the video and chapter titles to the main language of the viewer. Technical terms loose all their meanings once translated.

    • @typealias
      @typealias 5 днів тому

      Hey, thanks for mentioning that! Do you know the name of that option, or where I can find it? I just disabled the new Auto-Dub feature, but sounds like you might be talking about something else. Thanks!

    • @orghaniian
      @orghaniian 5 днів тому

      Hi, I have no idea of specific name of the option and from what I know it isn't retroactive so the changes will only be visible on new videos

    • @typealias
      @typealias 5 днів тому

      Okay, thanks. I'll poke around with this a little more and see if I can find it!

  • @asadullahilyas
    @asadullahilyas 6 днів тому

    How did you indent all arrows -> to right in when expression?

    • @typealias
      @typealias 5 днів тому

      Hey, Asadullah - thanks for asking! Just open up your settings/preferences and go to Editor > Code Style > Kotlin > Wrapping and Braces. Then scroll down that list and look for "Align 'when' branches in columns". Once that's set, then when you use the auto-formatter, they'll line up like that. Let me know if you have any trouble finding it!

    • @asadullahilyas
      @asadullahilyas 2 дні тому

      @@typealias Thank you, man. We all learn a lot from you. Keep up the good work.

  • @Apollointhehouse
    @Apollointhehouse 6 днів тому

    Couldn't you add swift style guards to kotlin with something like `inline fun guard(check: Boolean, block: () -> Nothing) { if (!check) block() }`?

    • @Apollointhehouse
      @Apollointhehouse 6 днів тому

      Then using said guard would be like `guard(order.placedByCustomerId == customer.id) { return }`, and you would be forced to short circuit since the lambda has a Nothing return type

    • @HoussamElbadissi
      @HoussamElbadissi 5 днів тому

      that looks very neat! and is totally in-line with how it would be implemented if it were an official part of the language; as many built-in features are just library functions, making use of the existing powerful language features

    • @typealias
      @typealias 2 дні тому

      Nice! 🎉 I'm going to play around with that and see what we can do with it! Thanks for sharing this.

  • @Khl8122
    @Khl8122 6 днів тому

    Nice transition from wwf to www (sort of)

  • @RyanBreaker
    @RyanBreaker 7 днів тому

    I like the idea of these guards. I've always been keen to short-circuiting to give a guaranteed state for the actual important logic or mutations and I can see the benefit of this experimental feature. What would be the timeline of it being brought to stable if it continues to move forward?

    • @typealias
      @typealias 2 дні тому

      I haven't yet seen an announcement about when they expect pattern guards to become stable... and there are some strong opinions out there about which keyword to use for it, or whether to include them at all. So for now, I suspect they're focused on just collecting community feedback about it.

  • @Mohammadkashifkhan2093
    @Mohammadkashifkhan2093 7 днів тому

    var me = "First"

    • @h4m74ro
      @h4m74ro 7 днів тому

      me = "Second" //😅

    • @simonfrancisco2193
      @simonfrancisco2193 7 днів тому

      @@h4m74ro me = "Third"

    • @HoussamElbadissi
      @HoussamElbadissi 6 днів тому

      ​@@h4m74ro hahaha best cautionary tale against using `var` by default 😆

  • @jackli1924
    @jackli1924 7 днів тому

    from simple to deep, a very concise but profound and informative explanation. Thank you a million times Deve! great job!

  • @joannajanaszek-y5v
    @joannajanaszek-y5v 8 днів тому

    this is awesome, so well explained. thank you!

  • @alphabe-j1n
    @alphabe-j1n 13 днів тому

    just tell me how you are doing kotlin better than kotlin ?

  • @radekspinka7558
    @radekspinka7558 18 днів тому

    Community comments are great!

    • @typealias
      @typealias 18 днів тому

      Thanks, Radek. Glad to know you liked that part - we'll plan to keep it as a regular segment! 👍

  • @MonichGPT
    @MonichGPT 20 днів тому

    Need swift to kotlin

    • @typealias
      @typealias 20 днів тому

      Maybe check out skip.tools/ ... I haven't used it myself, but it does Swift -> Kotlin, including the UI layer. A few guys from Skip were on the Kotlin podcast recently talking about it: ua-cam.com/video/mig81rSWVqM/v-deo.html

    • @MonichGPT
      @MonichGPT 20 днів тому

      @@typealias This is "Swift Multiplatform" but I need to use swift code in shared Kotlin module.

    • @HoussamElbadissi
      @HoussamElbadissi 19 днів тому

      @@MonichGPT I remember someone at JetBrains saying that the goal is two-way export between Swift and Kotlin. Now they're working on Kotlin to Swift export, then they'll hopefully tackle the other way around. And the delay to this is perfectly understandable; they're trying to make two fundamentally different languages interop with each other. As much as Swift and Koltin look familiar, Swift is quite a beast compared to Kotlin, and functions a bit differently to Kotlin in the lower levels as well (e.g. GC vs. RC). So while Kotlin/Native runs basically at the same level as Swift code (and they both compile down to LLVM IR, and from there they look basically the same to LLVM), it's still quite the challenge to get these languages to "seamlessly" interop without much friction at the higher levels (APIs etc.).

  • @jackli1924
    @jackli1924 20 днів тому

    As an experienced Android engineer. Should I learn multiplatform technical skills such as KMP, flutter, React Native. Which would be the best one.

    • @delespai5592
      @delespai5592 20 днів тому

      I would go with KMP, you already know Android and Kotlin and the KMP stack seems to be growing fast.

    • @jackli1924
      @jackli1924 20 днів тому

      @@delespai5592 Thank you bro, that makes sense.

  • @stephenmorse8207
    @stephenmorse8207 20 днів тому

    I wish Kotlin would add support for dataarg (similar to vararg). It would make data classes more composable -- e.g. clone a data class with a few more fields without copying the full list of fields.

    • @magiccuttlefish
      @magiccuttlefish 20 днів тому

      Why is it not here yet 😭

    • @typealias
      @typealias 20 днів тому

      Yeah, haven't heard tooooo much about that yet! Maybe upvote and/or comment on the issue here: youtrack.jetbrains.com/issue/KT-8214/Allow-kind-of-vararg-but-for-data-class-parameter

    • @fabianoaugustodemello3582
      @fabianoaugustodemello3582 15 днів тому

      It was mentioned in this talk (24 minute mark) that it will start in version 2.2: ua-cam.com/video/tAGJ5zJXJ7w/v-deo.html

  • @Das.Kleine.Krokodil
    @Das.Kleine.Krokodil 25 днів тому

    good

  • @FuzzyHeart-l3o
    @FuzzyHeart-l3o 25 днів тому

    So cool!

  • @ChristianMielke
    @ChristianMielke 29 днів тому

    this Video is so 🤯I'm a professional Java Developer, wich sitching currently to Kotlin, this is my 3th Video from you, and i love it. This is Nerd P**n

    • @typealias
      @typealias 29 днів тому

      Hey, thanks so much, Christian! 😁 Glad you're enjoying the videos!

  • @amiref9178
    @amiref9178 Місяць тому

    Thank you Dave. very clear explanation. more in-depth videos explaining coroutines please.

    • @typealias
      @typealias 29 днів тому

      Thanks, Amir! I'm expecting to get to some more coroutines videos in the new year!

  • @АлександрБугримов-о1е

    Do you plan to implement a Chain of Responsibility?

    • @typealias
      @typealias 29 днів тому

      Yes, Chain of Responsibility is still on the list!

  • @smreha
    @smreha Місяць тому

    Masterfully explained. Loving this series.

    • @typealias
      @typealias 29 днів тому

      Thanks so much! I'm glad you're enjoying it. More patterns videos coming soon.

  • @CodeWithLime
    @CodeWithLime Місяць тому

    Today I learned something new thankyou ❤

  • @ITksh-zp1ob
    @ITksh-zp1ob Місяць тому

    just one more example of how kotlin is badly designed

    • @teenriot-de
      @teenriot-de Місяць тому

      Its not Kotlins Design, its Javas Design. Kotlin was designed with the intention to give java developers a smooth opportunity to switch to Kotlin. So you have those Java elements in Kotlin still today. Everything Kotlin designed completely on its own has a much higher quality level. But as company you cant throw the industry standard java with all its existing libraries and products away when you want people to take you serious. And they did a great job in solving the dilemmas between Java and Kotlin, as best as possible.

    • @kirillsh8383
      @kirillsh8383 Місяць тому

      ​@@teenriot-de ahaha, very funny

  • @LightDante
    @LightDante Місяць тому

    11:29 Can you show the code snipet?

  • @smreha
    @smreha Місяць тому

    All the things are neat. It would be great if you also explain each of such cool language features with a practical use case.

  • @LightDante
    @LightDante Місяць тому

    why is this api still unreleased?

    • @typealias
      @typealias Місяць тому

      Yeah, seems pretty stable by now. There are quite a few official libraries, and I'm sure they all took a back seat to K2 until earlier this year. The roadmap shows a focus on ktor, exposed, kotlinx-datetime, and kotlinx-io. So this one might stay in its current state for a bit.

  • @gb_kash
    @gb_kash Місяць тому

    Awesome 👍

  • @teenriot-de
    @teenriot-de Місяць тому

    I wish the kotlin team had thrown away the java collections from beginning. They are so f***** wrong and Kotlin made it even more worse, (whats not their fault). 1. Iterating over an arraylist by index and get method is significantly faster than all other methods. The problem is, in kotlin using the lesser conrete type List for definitions is common. Even when all the Lists are 95% Arraylist you cant be sure. Its also possible that the List you got from somewhere is a Linkedlist and you go to performance hell with get method. 2. The problem is that the java lists are poorly optimized. When you want full performance you cant rely on the build in non existing optimizations, you have to optimize from outside. But when everybody uses non concrete types for defining their members and returns you have no chance. Best example is listOf() which creates a ArrayList but returns it as List. Knowing its an Arraylist would give you the possibility to optimize, but the information is just thrown away. If the collections would be well implemented it would be a good practice to use non concrete types, but they are not. 3. Java is unable to give lists a search(lambda) method in decades!!!!. It just have a forEach method. Where is the problem? The problem is that you have to use iterators when searching things since you should not use get-method because of not random access lists. So there is unnecessary object creation for such simple tasks even in kotlin even for arraylists what just a bummer. Java just have to add a search method to the list interface with a default implementation and let derived classes implement their optimized versions. 4. There is a RandomAccess-Interface for lists in Java, nice. ArrayList implements it, LinkedList dont, nice. But the Java-geniuses thought its a good idea to let RandomAccess not derive from List. Its a pure marker interface providing zero methos. WHY??? So we have RandomAccess which can do fast gets but it has no get-method and we have LinkedList which has a get-method but O(n) means it doesnt work. The existence of LinkedList.get() is a crime. But no problem, just hide the crime and let others run into problems: val iFeelAshamed : List<T> = LinkedList<T>. Using the non conrete type in this case doesnt even prevent optimizations it introduces heavy deoptimization The list goes on and on. Overall, i say: Mark java collections as depcreated and replace them by a modern, thoughtout and well implemented new library. Yes, i spent too much time in useless micro benchmarking last days and i saw things you have to call war crimes. Kotlin cant fix it by sugar and cosmetics.

  • @robchr
    @robchr Місяць тому

    This is why Compose by default does not treat `List` as stable since it may actually be mutable.

  • @pablovaldes6022
    @pablovaldes6022 Місяць тому

    I just treat my mutable list carefully and that's it. Immutability is mental 😅

    • @typealias
      @typealias Місяць тому

      I'm guessing that's the approach that most developers take. Just gotta watch out for that shared mutable state - thankfully if you're targeting JVM, you've at least got some options for synchronized or concurrent collections.

  • @jansmycka4338
    @jansmycka4338 Місяць тому

    "a MutableList" sounds awfully similar to Immutable list 😅

    • @typealias
      @typealias Місяць тому

      Haha, it sure does! It tripped up the transcribing software at least once, but I think I caught them all, so hopefully the subtitles are all correct. 😂

    • @teenriot-de
      @teenriot-de Місяць тому

      Yeah, "ReadOnly" is a better choice imho.

  • @funnysaltyfish
    @funnysaltyfish Місяць тому

    I never know this feature before, and after trying it, I find an interesting case: For this function: fun sum2(vararg args: Int): Int { return args.sum() } println(sum2(2, 3, 4)) When changing it to anonymous function like: val sum2 = fun(vararg args: Int): Int { return args.sum() } println(sum2(2, 3, 4)) IDE warns that `Vararg on this parameter is useless` and the call way is incorrect: `The integer literal does not conform to the expected type IntArray`. IDE tells me that the type of `sum2` is `(IntArray) -> Int`. However, after changing it to: val sum2 = fun(vararg args: Int): Int { return args.sum() } println(sum2(intArrayOf(2, 3, 4))) // here, wrap it with `intArrayOf` The IDE dose not show error lint, however, it cannot be compiled successfully: `Argument type mismatch: actual type is 'kotlin.IntArray', but 'kotlin.Int' was expected.` IDE is in K1 mode and Kotlin version is 2.0.21. Is that a bug or intended behavior?

    • @guai9632
      @guai9632 Місяць тому

      looks like a bug in IDE

  • @Jason-o5s
    @Jason-o5s Місяць тому

    Cheer~~~the fact or quality of being different, divergent, or inconsistent.😊

  • @nishchal.v
    @nishchal.v Місяць тому

    Awesome kotlin content on this channel!🙌

    • @typealias
      @typealias Місяць тому

      Hey, thanks so much, Nishchal! I'm glad you're enjoying it! 🎉

  • @Nick-cx4rs
    @Nick-cx4rs Місяць тому

    anonymous functions are useless should be removed.

    • @guai9632
      @guai9632 Місяць тому

      but they bring more fun ;)

  • @warTag68
    @warTag68 Місяць тому

    Very well explained. But as a non native-english speaker it's difficult to wrap my head around the meaning of keyword yield in this context

  • @MemooHamed
    @MemooHamed Місяць тому

    Can we code a game with kotlin???

    • @typealias
      @typealias Місяць тому

      Sure! Kotlin isn't the optimal language for creating AAA game titles, of course, but check out what you can do with KorGE: korge.org/

  • @pradeepkumarreddykondreddy7048
    @pradeepkumarreddykondreddy7048 Місяць тому

    I could not understand sealed class properly.

    • @tnelly27
      @tnelly27 10 днів тому

      I like to think of them as fancier enums. They have similar functionality, but sealed classes use classes instead of simpler enum values.

    • @32zim32
      @32zim32 7 днів тому

      ​​​​@@tnelly27 To make it harder, enum classes can have parameters and methods ) The difference is that enum classes will have the same "type" for each member, when sealed classes can have different classes inside

  • @davidtrpchevski
    @davidtrpchevski Місяць тому

    The moment I saw the return type as a Composable lamda, my jaw dropped. I learn from this channel every single day! Thanks, can't wait for the paperback version of the book!

    • @typealias
      @typealias Місяць тому

      Hey, thanks so much - I'm glad you've been enjoying it! I'm actively working on getting that paperback book available as soon as I can 👍

  • @Alchemist10241
    @Alchemist10241 Місяць тому

    Mr. Grumpy is always right and Dave is always wrong. just kidding. using contracts to check if a variable is null or not, simplifies the code a lot and makes it less error prone

    • @typealias
      @typealias Місяць тому

      Haha, Mr. Grumpy usually has a good point! 😁

  • @kela2812
    @kela2812 Місяць тому

    Thank you for this video! your explanations are so clear

    • @typealias
      @typealias Місяць тому

      Thank you so much! I'm glad it was helpful!

  • @ЕгорМазур-х1с
    @ЕгорМазур-х1с Місяць тому

    Great video! But what is anonymous function from internal POV? I mean lambda is anonymous class

  • @RomanDawydkin
    @RomanDawydkin Місяць тому

    So, with *this* kind of composition, we have one vehicle inside another vehicle?

  • @hosenalzuhile3019
    @hosenalzuhile3019 Місяць тому

    In our religious, Islam It's encouraging people to smile at each other The prophet Muhammad said "Your smile in your brother's face is charity" Thanks for sharing Dave ❤ Can't wait for your next video

  • @ss12p
    @ss12p Місяць тому

    You’re the best! I was wondering if you could consider making a video on Kotlin Flows. It would be really helpful to see topics like- Flow, StateFlow, SharedFlow

    • @typealias
      @typealias Місяць тому

      Hey, thanks so much! That's a great idea - I'll add that to my list for upcoming videos!

  • @osisuper98
    @osisuper98 Місяць тому

    You are the best man

  • @4movieslove
    @4movieslove Місяць тому

    Gratitude helps feel better.

  • @Alchemist10241
    @Alchemist10241 Місяць тому

    Based on this, operator functions like filter, map and find, all are using decorator pattern under the hood.

    • @typealias
      @typealias Місяць тому

      Well, the purpose of the decorator is to allow you to change the behavior of a function dynamically without class extension. A collection operator chain like you're talking about would work similarly in that it'd make incremental transforms to the data that it starts with. But the reason I wouldn't consider them decorators is that they aren't creating an object that can be called multiple times - when you call them, they return a result rather than an object that can return a result. With the logger example at the end of this video, the fluent function calls are creating something that you can call later. Hope that makes sense!

    • @Alchemist10241
      @Alchemist10241 Місяць тому

      @@typealias thanks for the dedicated reply.