Marc Knaup
12/04/2020, 3:40 PMlazy & related overhead to every single one of them?
In my project I use the pattern val foo = object : SomeBaseClass { … } quite a lot and just now recognized that there’s an insane amount of initialization going on during startup. All such val get evaluated at startup and all properties of these objects get evaluated too which in turn runs all their delegate providers.Marc Knaup
12/04/2020, 3:43 PMSvyatoslav Kuzmich [JB]
12/04/2020, 3:44 PMMarc Knaup
12/04/2020, 3:45 PMSvyatoslav Kuzmich [JB]
12/04/2020, 3:46 PMSvyatoslav Kuzmich [JB]
12/04/2020, 6:03 PMval foo = object : SomeBaseClass { … } with object Foo : SomeBaseClass { … } , it would be initialized lazily.Marc Knaup
12/04/2020, 6:08 PMprivate val. I cannot easily do that with named objects because even private object causes name collisions across files 😞
I’d have to unnecessarily come up with a crazy amount of named objects to just work around that. And all places that use properties of these objects would also have to use these class names.
I really miss namespaces sometimes 🤷♂️Svyatoslav Kuzmich [JB]
12/05/2020, 9:10 AM@JsExport name collision errors in IR compiler in the future.spand
12/07/2020, 8:53 AM