From what I've learned, it seems like extension function T.run
and with
have kind of the same purpose of creating the possibility to group multiple calls on the same object, returning lambda's last object as its result.
T.run()
has the advantage of applying check for nullability before using it. (as this article points it out)
What are the advantages of using with
? or better said: What stops me from always using T.run()
instead?
Thanks