Kotlin Standard Delegates - Lazy, Observable and Vetoable

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ต.ค. 2024

ความคิดเห็น • 25

  • @SimplifiedCoding
    @SimplifiedCoding  3 ปีที่แล้ว +8

    At 4:52 I accidentally said that "to the constructor we will pass", but the observable is a function and not a class. So here we are passing the initial value to the function as a parameter. Sorry for this.

  • @jamadir
    @jamadir 2 ปีที่แล้ว

    thank you very much! super simply explained!

  • @TheImaginativeSachin
    @TheImaginativeSachin ปีที่แล้ว

    These are awesome do you videos explaining all about lamdas. It's hard to understand :(

  • @mohamedfiyaz8356
    @mohamedfiyaz8356 3 ปีที่แล้ว +1

    Useful topics which used while day today coding. 👍

  • @GriNAME
    @GriNAME 3 ปีที่แล้ว

    Thank you a lot! Really cool lessons!

  • @theredd1703
    @theredd1703 ปีที่แล้ว

    Thanks!!!

  • @ajeenadev6636
    @ajeenadev6636 3 ปีที่แล้ว

    Nice class

  • @77Bibo77
    @77Bibo77 3 ปีที่แล้ว

    That was really good! MTBA

  • @abhishekjha4290
    @abhishekjha4290 3 ปีที่แล้ว

    Great work.....

  • @shreyashchoudhary7413
    @shreyashchoudhary7413 3 ปีที่แล้ว

    Loved it!

  • @ahmednabil5119
    @ahmednabil5119 3 ปีที่แล้ว

    Thanks alot.

  • @brucebane7401
    @brucebane7401 3 ปีที่แล้ว

    amazing tutorial !!!!

  • @brucebane7401
    @brucebane7401 3 ปีที่แล้ว

    what is the datatype/classtype of heavy. dont we have to specify a classname when lazy loaded like
    val heavy:Classname by lazy ......

  • @manikandan97
    @manikandan97 3 ปีที่แล้ว +1

    Hai bro, why video quality is only 320p what happened?

    • @SimplifiedCoding
      @SimplifiedCoding  3 ปีที่แล้ว +2

      TH-cam takes some time to process HD videos, after some time it will become Full HD.

    • @Arunkumar-xf1hd
      @Arunkumar-xf1hd 3 ปีที่แล้ว

      @@SimplifiedCoding i seen in 1440p60 thankyou so much sir for all your helpfull videos

  • @akashviet007
    @akashviet007 3 ปีที่แล้ว

    we can observe the changes by defining normal setter also, then what is the use of Delegate.observable ??

    • @SimplifiedCoding
      @SimplifiedCoding  3 ปีที่แล้ว +2

      Functionality wise both are same but delegates may be better in cases where you are having the same functionality for multiple variables.
      With setters you need to write duplicate code
      but
      You can assign the deligate to a variable and then use the same variable as the delegates. This will reduce your code repetition.

    • @akashviet007
      @akashviet007 3 ปีที่แล้ว

      @@SimplifiedCoding Okay 👍

  • @gibraanjafar1669
    @gibraanjafar1669 3 ปีที่แล้ว

    If incase anyone is using some other editor like VSCode, vim etc , do add the import => import kotlin.properties.Delegates.

  • @arjundixit5913
    @arjundixit5913 3 ปีที่แล้ว

    vetoable vs setter? set(value) { field = value } also does the same thing i guess

    • @vathsan3906
      @vathsan3906 3 ปีที่แล้ว

      I guess vetoable is like set(value) { if(condition) field = value }