# Kotlin type aliases versus functional interfaces for debuggable, distinct handler types

DevFeed: [Kotlin type aliases versus functional interfaces for debuggable, distinct handler types](<https://devfeed.tech/articles/the-case-of-the-missing-handler-27350.md>)

Original publisher: [Read original article](<https://blog.mmckenna.me/the-case-of-the-missing-handler>)

Author: Matt McKenna

Published: 2025-08-28T04:00:22Z

Content type: tutorial

Language: en

Sources: [Matt McKenna](<https://devfeed.tech/sources/matt-mckenna.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [debugging](<https://devfeed.tech/topics/debugging.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [debugger](<https://devfeed.tech/tags/debugger.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [function](<https://devfeed.tech/tags/function.md>), [generic](<https://devfeed.tech/tags/generic.md>), [interface](<https://devfeed.tech/tags/interface.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>)

## AI overview

This Kotlin article explains that a type alias for a function type does not create a distinct type, so its name can disappear from debugging and stack traces. It recommends functional interfaces when type identity, discoverability, distinct callbacks, and simple testing fakes are important.

## Source excerpt

Our story begins with a clean line of Kotlin: typealias Handler = (result: Result) -> Unit It looks innocent. Give a function type a name and tidy up the signatures, great! Then a bug hits. The Handler is gone in the debugger and in stack traces onl...