Skip to content

Tag: Kotlin

Meta-Programming with Kotlin for Android

What is programming?; Simply programming means reading some data on input, operating on that data, and giving some output. Metaprogramming is a programming technique in which we can read codes as input, operate on those codes, and provide generated codes or change the running programs’ behavior. Assume we want to manage dependencies between our classes and inject themes in our code-base(dependency injection). Here we must write boilerplate codes to inject our dependencies into our code-base. How can we solve this problem? Do we have tools that generate these boilerplate codes based on metadata? With metaprogramming, we can fix these kinds of problems. All programming languages that developers can use for meta-programming purposes and have meta-features called metalanguage, like Kotlin, C, Java, and Python. Compilers, Assemblers,…

Comments closed