Generics in Kotlin

Kotlin is an interesting JVM language. Today I want to show some capabilities Kotlin has around Generics. Generics are super important for any language. However, some languages abuse generics and have gaps. Generics are important for code reuse and also to enforce type constraints for safety. Kotlin has some interesting ways to express type constraints. So today I made a simple video and code POC. Let's get started!




The Video

The Code

https://github.com/diegopacheco/kotlin-playground/tree/master/kotlin-generics-fun

Cheers,

Diego Pacheco

Popular posts from this blog

Kafka Streams with Java 15

Rust and Java Interoperability

HMAC in Java