Reflection?

The key feature that is missing from kotlin.reflect is java.lang.Class.forName(String).

We use forName( ) in a variety of patterns in library code. One pattern is to provide implementations of interfaces at runtime that can’t be known at compile time (probably what darksnake’s point 2 refers to). Another important pattern is that for certain application classes (not library code), the library code checks to see if an additional class exists with the same name except we insert “.generated” into the package name structure (those classes are machine generated, not hand-coded). It is correct as far as the library API is concerned for the generated class to exist or not exist in any given invocation of the application. The concept of the generated class existing or not existing is as simple as adding or removing it from the .jar file, or simply removing a .jar file from the classpath of the invocation. No packaging tool creating bundles with permutations of classes included is used - the .generated class either exists or doesn’t exist at runtime and that’s fine.