#kotlintips — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #kotlintips, aggregated by home.social.
-
❓ Want to improve the readability of nested function calls in Kotlin code?
👉 Learn how to simplify functional composition in Kotlin with the let scope function in my latest article: https://medium.com/@elenavanengelen/kotlin-tips-and-tricks-you-may-not-know-5-simplify-functional-composition-with-let-0ae48d91c860
#Kotlin #KotlinTips #FunctionalProgramming -
❓ Want to improve the readability of nested function calls in Kotlin code?
👉 Learn how to simplify functional composition in Kotlin with the let scope function in my latest article: https://medium.com/@elenavanengelen/kotlin-tips-and-tricks-you-may-not-know-5-simplify-functional-composition-with-let-0ae48d91c860
#Kotlin #KotlinTips #FunctionalProgramming -
Impressed by how developers at #dayjob were able to elegantly leverage the Kotlin type system to create even more opportunities for NPEs:
fun info(tag: String?, msg: String?) {
logInfo(tag!!, msg!!)
} -
Did you know Kotlin offers built-in functions for validating your data and maintaining accuracy? Check out my blog Kotlin's built-in assertions and learn how to simplify your code while improving code reliability.
https://medium.com/@elenavanengelen/kotlin-tips-and-tricks-you-may-not-know-3-built-in-assertions-d26540ccb2e0
#Kotlin #KotlinTips #Programming -
Did you know Kotlin offers built-in functions for validating your data and maintaining accuracy? Check out my blog Kotlin's built-in assertions and learn how to simplify your code while improving code reliability.
https://medium.com/@elenavanengelen/kotlin-tips-and-tricks-you-may-not-know-3-built-in-assertions-d26540ccb2e0
#Kotlin #KotlinTips #Programming -
👨💻 Elevate your Kotlin skills with Romain Guy from Google! Join our live discussion on performance and optimizations: https://cwti.link/twitch #KotlinTips #EfficientCoding
-
👨💻 Elevate your Kotlin skills with Romain Guy from Google! Join our live discussion on performance and optimizations: https://cwti.link/twitch #KotlinTips #EfficientCoding
-
Prevent exceptions in Kotlin with the Safe Cast operator! Learn more in my latest article:
https://towardsdev.com/kotlin-tips-and-tricks-you-may-not-know-2-safe-cast-operator-19773bdc520f -
Prevent exceptions in Kotlin with the Safe Cast operator! Learn more in my latest article:
https://towardsdev.com/kotlin-tips-and-tricks-you-may-not-know-2-safe-cast-operator-19773bdc520f -
♲ @[email protected]:#KotlinTips
The ‘when’ expression is exhaustive if used in combination with sealed classes or enums. The compiler will complain if you forget to handle any of the cases, thus alerting you to possible mistakes. -
In Kotlin/JS windows.fetch.json() on array responses returns JS Arrays so cast to Array<T> *NOT* List<T>. If you need to return a List<T> create it from the fetch results (Array doesn't have .toList though). #KotlinTips #kotlin