Any idea how this would work if I'm not using ForeignKeys because of soft-deletes?
In this post, I want to give you a clear explanation of type variance in Kotlin. We’ll cover the following topics:
Let’s dive right in! 🤓
When talking about variance, you can think about the relation between generic types that share the same base type but have different type arguments. When working with a List<Any>, the base type would be List and the type argument Any. This relation is key to provide type safety in your API.
An important aspect to keep in mind is that while it’s safe…
Using the same language throughout your whole project can further streamline and speed up your development process. With the stable release announcement of the Kotlin DSL for Gradle, things got even more compelling for modern Android development considering Kotlin is now the preferred language for Android. The Kotlin DSL has some clear benefits in contrast to the Groovy DSL, which includes the following:
→ Keep in mind that the code snippets provided in this post are reduced to highlight the important changes…
Computer Science Student