# Reification

Published articles for Reification.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Type Parameter

DevFeed: [Type Parameter](<https://devfeed.tech/articles/type-parameter-25027.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/type-parameter/>)

Author: author@typealias.com (Dave Leeds)

Published: 2018-01-04T03:23:40Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [generics](<https://devfeed.tech/topics/generics.md>), [Code](<https://devfeed.tech/topics/code.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [classes](<https://devfeed.tech/tags/classes.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [function](<https://devfeed.tech/tags/function.md>), [generic](<https://devfeed.tech/tags/generic.md>), [generics](<https://devfeed.tech/tags/generics.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [reification](<https://devfeed.tech/tags/reification.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial explains type parameters in generics: how they are declared and used, naming conventions, constraints that limit allowable types, variance in generic subtyping, and reified type parameters.

### Source excerpt

A type parameter is a placeholder for an actual type, which gets specified by the code that's using the generic. If you imagine your generic as a light fixture, the type parameter would be the socket where the light bulb goes. Just as you can choose from a variety of different light bulbs to put into that socket, the calling code can choose from a variety of different types to pass to a generic.

## Getting Real with Kotlin's Reified Type Parameters

DevFeed: [Getting Real with Kotlin's Reified Type Parameters](<https://devfeed.tech/articles/getting-real-with-kotlin-s-reified-type-parameters-25034.md>)

Original publisher: [Read original article](<https://typealias.com/guides/getting-real-with-reified-type-parameters/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-10-12T02:26:46Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

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

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [generic](<https://devfeed.tech/tags/generic.md>), [generics](<https://devfeed.tech/tags/generics.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [reification](<https://devfeed.tech/tags/reification.md>), [reified-type-parameter](<https://devfeed.tech/tags/reified-type-parameter.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [type-parameters](<https://devfeed.tech/tags/type-parameters.md>)

### AI overview

This Kotlin tutorial explains where generic type parameters can replace concrete class names and where they cannot. It introduces reified type parameters, explaining that they work with inline functions because the function body is expanded at the call site, allowing type comparisons and access to Class objects at runtime.

### Source excerpt

Let's think for a moment about everything that you can do with a class name in Kotlin - think of all the cases where you literally type out the name of a class in your source code. I came up with the following 15 cases, but I probably missed a few. Get your scrolling finger ready, here we go... 1 - Define a member property: private val thing: Thing 2 - Function argument: fun doSomething(thing: Thing) {} 3 - Type argument: val list = listOf<Thing>() 4 - Type parameter constraint: class Item<T : Thing> 5 - Cast to the type: something as Thing 6 - Define the class: open class Thing {} 7 - Extend the class: class Other : Thing() 8 - Import the class: import com.

## Reified Type Parameter

DevFeed: [Reified Type Parameter](<https://devfeed.tech/articles/reified-type-parameter-25021.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/reified-type-parameter/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-10-07T03:42:19Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>)

Tags: [cast](<https://devfeed.tech/tags/cast.md>), [class](<https://devfeed.tech/tags/class.md>), [code](<https://devfeed.tech/tags/code.md>), [examples](<https://devfeed.tech/tags/examples.md>), [extension-function](<https://devfeed.tech/tags/extension-function.md>), [function](<https://devfeed.tech/tags/function.md>), [generic](<https://devfeed.tech/tags/generic.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [property](<https://devfeed.tech/tags/property.md>), [reification](<https://devfeed.tech/tags/reification.md>), [reified-type-parameter](<https://devfeed.tech/tags/reified-type-parameter.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [types](<https://devfeed.tech/tags/types.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

An explanation of reified type parameters, including how they preserve type information in inline functions, support type checks and casts, and can provide class objects. The article covers single and multiple parameters, extension properties, requirements, alternatives, and code-size considerations.

### Source excerpt

Reified type parameters are type parameters that retain more characteristics of actual types than normal type parameters do. For a gentle introduction to the topic, check out the guide, Getting Real with Reified Type Parameters. Examples Single Parameter inline fun <reified T> Any.isInstanceOf(): Boolean = this is T Here we created an extension function to wrap the more common is operator. Why is this example so magical? Because normally, compiling this is T would result in an error since the type of T is erased.