---
title: "Discussion on \"What Is the Difference Between lazy and lateinit in Kotlin, and What Does by Do?\" | Hashnode"
description: "Discussion on \"What Is the Difference Between lazy and lateinit in Kotlin, and What Does by Do?\". lazy vs lateinit in Kotlin: how by and delegated properties work, who sets the value, thread safety, isInitialized, a Fragment trap, and what the bytecode shows."
url: "https://hashnode.com/posts/kotlin-lazy-vs-lateinit/6b107eb875dee96e44cc802b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What Is the Difference Between lazy and lateinit in Kotlin, and What Does by Do?](https://imayankkumar.hashnode.dev/kotlin-lazy-vs-lateinit?utm_source=hashnode&utm_medium=feed)

lazy vs lateinit in Kotlin: how by and delegated properties work, who sets the value, thread safety, isInitialized, a Fragment trap, and what the bytecode shows.

3d ago · 9 min read · imayankkumar.hashnode.dev  
Read the article

-   [#kotlin](https://hashnode.com/tag/kotlin)
-   [#android](https://hashnode.com/tag/android)
-   [#android-app-development](https://hashnode.com/tag/android-app-development)
-   [#programming-basics](https://hashnode.com/tag/programming-basics)

## Written by

[Mayank Kumar](https://hashnode.com/@imayankkumar)

@imayankkumar · Bengaluru, India

  
[View profile](https://hashnode.com/@imayankkumar)

Senior Android Engineer | Kotlin, Android Internals, Performance Engineering & AI

I'm Mayank, an Android engineer focused on Kotlin, software architecture, performance engineering, and AI-assisted development. I write about building Android apps with AI, including the experiments that don't work.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
