# Remove \`inner\` classes

**URL:** <https://discuss.kotlinlang.org/t/remove-inner-classes/18742>\
**Category:** Language Design\
**Created:** [August 11, 2020, 5:36pm UTC](https://discuss.kotlinlang.org/t/remove-inner-classes/18742 "2020-08-11T17:36:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterhenryd](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@peterhenryd](https://discuss.kotlinlang.org/u/peterhenryd)\
**Post date:** [August 11, 2020, 5:36pm UTC](https://discuss.kotlinlang.org/t/remove-inner-classes/18742/1 "2020-08-11T17:36:55Z")

</div>

Instead of `inner` classes. Make it so inner classes go inside the base of classes, and static classes go in companion objects. Besides breaking compatibility with lots of code, I see no reason why this isn’t a good idea. It makes more sense with how Kotlin companion objects work.

```kotlin
class Test {
  val thing = "Hi"

  class Inner {
    init {
      print(thing)
    }
  }

  companion object {
    class StaticClass {
      init {
        print(thing) // Error!
      }
    }
  }
}

```
