Closures, methods, static methods, class methods

Everything you ever wondered about closures, and a few things more: Closures: just what are closures? Closures as code, packaged with parameters Methods as closures: Python Methods as closures: Kotlin Static Methods class level methods/companion object methods Closures: just what are closures? Lets start with an example, and then discuss how it works. The function… Continue reading Closures, methods, static methods, class methods

Advertisements

self, this + modifiers: private, public, protected, internal, open, final, inline

contents: self vs this this@ external attribute access why bother? python modifiers visibility inheritance: open, final, override inline self vs this Self vs this are not technically modifiers, but they do work in a similar way, to modify that 'self.name' can be different from 'name'. Code inside a class must work without an actual instance… Continue reading self, this + modifiers: private, public, protected, internal, open, final, inline