OkKotlin
  • HomeHome
  • ArticlesArticles
  • NewsletterNewsletter

Safely accessing lateinit variables

December 29, 2019

/

3 min read

/

#lateinit

#tips

Lateinit variables are handy when we can't define a variable value upfront. Let's see how we can safely access lateinit variables without crashing our program.

Previous weeks
Previous weeks
December 22, 2019

Uniform list access with subscripts

Subscripts make accessing data from lists unambiguous. Let's see how we can add subscripts support for our custom data models.

December 15, 2019

Computed properties with property getters

Ever wanted to create a derived property out of some existing ones? Let's see how we can create computed properties with Kotlin property getters.

December 8, 2019

Low-overhead wrappers using inline classes

Wrappers shouldn't slow down our programs. Let's have a look at how we can use inline classes to create type-safe lightweight wrappers.

December 1, 2019

Writing clean models using extensions

Logic inside model classes? This week we will see how to maintain visual boundaries between logic and data in model classes.

November 24, 2019

Maintaining crisp code with type aliases

Type aliasing is that small but nifty feature that will help you keep your code readable. Let's see how.

View all articles

Copyright © 2022 Typemojo LLP.   OkKotlin is brought to you by@chowdhuryrahul.

OkKotlin on TwitterSubscribe to OkKotlin's Feed Email OkKotlin