Kotlin Scope Functions Tutorial - let, run, with, apply and also

Поділитися
Вставка
  • Опубліковано 1 гру 2024

КОМЕНТАРІ • 32

  • @dahlola
    @dahlola 3 роки тому +7

    Nice video! But you did a mistake explaining with. You still referred to square when it should be this. But easy to miss these things :)

    • @SimplifiedCoding
      @SimplifiedCoding  3 роки тому +1

      Can you tell me the time?

    • @dahlola
      @dahlola 3 роки тому

      @@SimplifiedCoding 9:15

    • @BelalKhan
      @BelalKhan 3 роки тому +1

      Yeah, I noticed now. Thanks for pointing out ✌️✌️

    • @udaysharma5228
      @udaysharma5228 Рік тому

      You don't even need to use this!

  • @manyantra
    @manyantra Рік тому

    very nice video on how to use scope functions

  • @saquibsiddique2641
    @saquibsiddique2641 3 роки тому +5

    please dive a little deep into how they are working and why we have 5 different scope functions

  • @silvahawk
    @silvahawk 3 роки тому +2

    I think it'd be nice if you could explain the difference in this vs. it as well. I kinda understood the concept, but had to look it up myself for the difference between those keyword to make sure I didn't miss anything

  • @dikshakoratkar5538
    @dikshakoratkar5538 Рік тому

    This tutorial is very helpful. My all concepts cleared about scope function

  • @frozen1093
    @frozen1093 3 роки тому

    Thank you!

  • @shreyashchoudhary7413
    @shreyashchoudhary7413 3 роки тому

    Loved it!

  • @radbaver
    @radbaver 3 роки тому

    Thank you ! Great one 😃

  • @thakurgopaldangi8159
    @thakurgopaldangi8159 3 роки тому +2

    hello, video are good but still how we can use scope function differently? all are done same kind of task with its objects.

    • @SimplifiedCoding
      @SimplifiedCoding  3 роки тому

      We will learn more about it, when we will start learning android development just after this course. So stay tuned.

  • @TheKamble
    @TheKamble 3 роки тому +2

    I still don't get the difference between them. They appear pretty similar to be, maybe adding some use cases would help. I only use let and apply. The rest I don't know where to use them.

    • @ravi_sorathiya
      @ravi_sorathiya 3 роки тому +1

      Let apply also is use most of the time
      Run, with you hardly use

  • @vengateshm2122
    @vengateshm2122 3 роки тому +4

    Usage in android:
    Intent(this,SignupActivity::class.java)
    .apply{
    putStringExtra(SCOPE_KEY, "admin")
    }
    .also{it ->
    startActivity(it)
    }

    • @frozen1093
      @frozen1093 3 роки тому

      But we are able to write StartActivity(this) inside apply , aren't we?

    • @vengateshm2122
      @vengateshm2122 3 роки тому

      @@frozen1093 yes we can

    • @frozen1093
      @frozen1093 3 роки тому

      @@vengateshm2122 but why did you use also, mb it's better to write it like you did ?

    • @vengateshm2122
      @vengateshm2122 3 роки тому

      @@frozen1093 apply we use to set attributes of an object whereas also can be used to perform some operations using that object

    • @frozen1093
      @frozen1093 3 роки тому +1

      @@vengateshm2122 ohh I got it, thanks a lot

  • @kishorramani007
    @kishorramani007 3 роки тому

    If we can't return this, it also work
    In which situation, it's not updating value

  • @SAJJADAHMAD-uy3hu
    @SAJJADAHMAD-uy3hu 3 роки тому

    Pl make some videos on covariance and contravariance in kotlin. I don't undestsnd the meaning of out keyword in kotlin. No youtuber from our country has yet made any video to clear this concept. It will be your great favour to me if you make video
    on covariance and contravariance in kotlin

  • @prometheusli101
    @prometheusli101 3 роки тому +1

    i dont konw whats different with them,there are almost the same。so i just get one which i prefer。

    • @Packiaraj07
      @Packiaraj07 3 роки тому

      Me too have the same question.. could you please explain with good example for all these. Which will help to use it in the right place

    • @SimplifiedCoding
      @SimplifiedCoding  3 роки тому

      That's perfectly fine, you can use any function that you like.

  • @ss-xn5rw
    @ss-xn5rw 3 роки тому

    good video but what the difference between it n this

  • @abbasalidaruwala
    @abbasalidaruwala 3 роки тому

    Hi run and with are almost same? Instead run is better because less code?

  • @randyorton3265
    @randyorton3265 3 роки тому

    bhai thodi hindi bhi bol diya karo

  • @shreyashchoudhary7413
    @shreyashchoudhary7413 3 роки тому

    Loved it!