00:00 Welcome 00:45 Types of Scope Functions 03:34 'with' function 08:40 'apply' function 11:45 'also' function 16:43 'let' function 21:47 'run' function 25:10 Quick Video Guide
Fact! I have seen so many kotlin tutorial but there are only a few channels who actually clear out the concepts rather than just writing code directly. Kudos to this man!
Hi Sriyank, I'm still confusing to differentiate between "let" and "run". Based on your example, both are very similiar for me. Those functions do some operations and return a lambda result. The only thing I can tell the different is the context object but that isn't the point I'm looking for. So, could you tell me more detail about when to use "let" and "run". Thanks a lot Sriyank
Thank you. I watch the original Kotlin documentation about scope function, but with no avail to understand them. Your comprehensive and practical explanation in this video makes me understood.
If kotlin is a clear, concise language then your kotlin tutorials are as well. Hands down the best explanation I had found online even better than the kotlin documentation.
Salute Sir , i did not understand all these things but your style of teaching is very nice, anyone can learn easily . Now i understood the use of scope functions. Thank you so much
Hey bro, ur tutorial videos were very helpful for me to learn more about kotlin. Thanks for every tips you hd given in every videos. During this lockdown I'm trying to build modads specifically for rewarded advertisement using kotlin, but confused with the adding of items in toolbars and linking with rewarded videos. Yes I'm beginner here!
whats the difference between run and let, you have wriiten same description for both,, only difference is referring contextobject with it and this, is this the only difference?
Thank you for such a nice explanation. This helps a lot. To be honest, Kotlin is one of the biggest disaster in programming world. But due to some heavy investment in Kotlin our company I would have to learn and work on it.
val person = PersonData() val value: Int = with(person) { name = "Deepak" } val person1 = PersonData().apply { name = "Deepak" } I can do the same thing with apply and with then now how to know where to use which one?
I am just a beginner in kotlin and can anyone help me to do this program to create password? 1.User should be able to enter the text 2.Find odd numbered words(eg. *Hai How are you?* ,where odd numbered words are Hai,are) 3.Select even numbered character from the selected words 3.Pswd length should be greater or equal to total word count(eg.Hi How are you?,word count=4 and pswd length should be >=4)Add * to make the word count equal to pswd length.(if word count=5,and pswd length=2 then add 3 '*')(if pswd =st and word length is 5,final pswd must be st***) 4.include single quote ' ' before and after the pswd for better understanding 5.Character count must start from 1 not from 0(H-1,a-2,i-3..vice versa) Eg.input text:Hai. How aRe you? Output:'a.R*' Input text:Hellooooo. How r you? Output:'eloo'
your concept is bit confusing and incomplete at 24:28 you said "Use safe call with run to avoid null pointer" but what is the point of using " obj?.let{} " if we can already make our code null safe with run and what is the difference in " obj?.also{} ", one more thing you modified the contents of the list by adding numbers inside also{} which is wrong we should not modify the contents of object inside also{}
2:12 I just hate it when they find a new way to do the same thing people have been doing for ages. Calling it more concise and easier to read what's the point of constantly learning new ways to do the same thing?
Thank for this excellent explanation , I am now more confidant and will use this vid reference to research my memory. Can you please create a video where you use these Scope fun in an Android app.