# PRE SIP: ThisFunction | scope injection (similar to kotlin receiver function)

**URL:** <https://contributors.scala-lang.org/t/pre-sip-thisfunction-scope-injection-similar-to-kotlin-receiver-function/2234>\
**Category:** Language Design\
**Created:** [August 30, 2018, 10:12am UTC](https://contributors.scala-lang.org/t/pre-sip-thisfunction-scope-injection-similar-to-kotlin-receiver-function/2234 "2018-08-30T10:12:44Z")\
**Posts on this page:** 1\
**Showing post:** 53

<div class="post-metadata">

**Author:** ![AMatveev](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/amatveev/32/847_2.png) [@AMatveev](https://contributors.scala-lang.org/u/AMatveev)\
**Post date:** [March 5, 2019, 6:48am UTC](https://contributors.scala-lang.org/t/pre-sip-thisfunction-scope-injection-similar-to-kotlin-receiver-function/2234/53 "2019-03-05T06:48:44Z")

</div>

Actually this example is not completely correct.  
see

> [@DelayedInit or OnCreate, any solution?](https://contributors.scala-lang.org/t/delayedinit-or-oncreate-any-solution/1748/10):
>
> Just to expand on the use case in ScalaFX, the scalafx.application.JFXApp trait primarily does two things: Firstly, it initializes JavaFX and starts the JavaFX Application Thread (JFXAT), using any supplied command line arguments. It then uses scala.DelayedInit to queue up all sub-class constructors (in the exact same manner as with scala.App) but then passes them for execution to the JFXAT. This is extremely convenient, because interaction with the JavaFX API must typically take place only …

Kotlin reciever function do not use constructors for building. It is important thing.

---

_[View the full topic](https://contributors.scala-lang.org/t/pre-sip-thisfunction-scope-injection-similar-to-kotlin-receiver-function/2234)._
