# Should Superman run in underwear to be faster?

**URL:** <https://discuss.kotlinlang.org/t/should-superman-run-in-underwear-to-be-faster/1559>\
**Category:** Language Design\
**Created:** [March 27, 2016, 3:18am UTC](https://discuss.kotlinlang.org/t/should-superman-run-in-underwear-to-be-faster/1559 "2016-03-27T03:18:48Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Markus\_M](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Markus\_M](https://discuss.kotlinlang.org/u/Markus_M)\
**Post date:** [March 28, 2016, 9:09am UTC](https://discuss.kotlinlang.org/t/should-superman-run-in-underwear-to-be-faster/1559/3 "2016-03-28T09:09:22Z")

</div>

I’m not a chef in low-level language kitchen so i’d like to clarify it for myself. Please tell me where i’m wrong. (I’m not arguing, Just curious)

If we have that source code:

```
class Robin {
  val superman = Superman()
  fun letsRescueTheWorld() {
    superman.prepare { thing -> "<Super $thing />" }
  }
}

class Superman {
  inline fun prepare(putOn: (String) -> String): List<String> {
    return (underwear() + "Red cape with 'S'").map { putOn(it) }
  }
  private fun underwear(): List<String> {
    return listOf("Something", "that Superman would prefer", "not to show")
  }
}

```

Could the generated code be something like that ?:

```
class Robin {
  val superman = Superman()
  fun letsRescueTheWorld() {
    // inline transformation
    (superman.synthetic_underwear() + "Red cape with 'S'").map { thing -> "<Super $thing />" }
  }
}

class Superman {
  inline fun prepare(putOn: (String) -> String): List<String> {
    return (underwear() + "Red cape with 'S'").map { putOn(it) }
  }
  fun synthetic_underwear() = underwear()
  private fun underwear(): List<String> {
    return listOf("Something", "that Superman would prefer", "not to show")
  }
}

```

Than what is that “anything exposed by inline function that can break client code” ?

And if this assumption is in fact silly. let’s back to solutions suggested by you.  
In particular by annotation do you mean something like Android @hide ?  
And you did not mention are there any plans to implement any solution for that issue?

---

_[View the full topic](https://discuss.kotlinlang.org/t/should-superman-run-in-underwear-to-be-faster/1559)._
