Kotlin generics Array results in “Cannot use T as a reified type parameter. Use a class instead” but List does not

Looking at the declaration of emptyArray() in the kotlin stdlib (jvm), we notice the reified type parameter: public inline fun <reified @PureReifiable T> emptyArray(): Array<T> The reified type parameter means that you have access to the class of T at compile-time and can access it like T::class. You can read more about reified type parameters … Read more

What are Reified Generics? How do they solve Type Erasure problems and why can’t they be added without major changes?

The whole point is that reified generics have support in the compiler for preserving type information, whereas type erased generics don’t. AFAIK, the whole point of having type erasure in the first place was to enable backwards compatibility (e.g. lower versioned JVMs could still understand generic classes). You can explicitly add the type information in … Read more

What do “reify” and “reification” mean in the context of (functional?) programming?

So I read up on this, and it is pretty much what it means: taking an abstract concept and making it concrete. Or, there is a proxy that represents the abstract concept. For example, in Lisp, the concept of procedure abstraction and application is reified when you use lambdas. Reification by itself is a broad … Read more

What is reification?

Reification is the process of taking an abstract thing and creating a concrete thing. The term reification in C# generics refers to the process by which a generic type definition and one or more generic type arguments (the abstract thing) are combined to create a new generic type (the concrete thing). To phrase it differently, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)