melatonina
11/15/2020, 10:42 AMJoe S
11/16/2020, 9:11 PMmelatonina
11/16/2020, 10:27 PMSamkeene
11/17/2020, 10:07 AMSamkeene
11/17/2020, 10:36 AMjschneider
11/17/2020, 1:42 PMmelatonina
11/17/2020, 4:31 PMroot
property each and every time, so you have to duplicate methods for them to work both on a node or a UIComponent. Notice also how you have builder which elegantly builds, configures and adds a node to the parent at once but there is nothing like that for a UIComponent. So the "builder DSL" abstraction falls apart when you attempt to reuse a combination of elementary nodes with some added functionality. The Kotlin support for DSLs is not good enough for using it for GUIs or any other domain where substantial subclassing is involved. That's why they extended Kotlin with a compiler plugin to properly implement a declarative GUI toolkit in Jetpack Compose.
Scopes are provided by any dependency injection framework, which you would need to use anyway, in a bigger application. Now you have to learn two of them, and most importantly know the limitation and bugs of two of them.
Of course, for some uses and for some people these two abstraction, as provided by TornadoFX, may be perfectly fine, even if they are clunky.
There are other things to say. I'll stop here because it looks like I'm here to criticize Edvin's work and Edvin through his work. I don't enjoy this role. In the good and the bad, I'm really thankful to Edvin for sharing this piece of code, and to the people who gave me suggestion in this channel. Please pardon me, if I offended anyone.