With the @Composable way, they are hooking into the compiler to make the functions be compatible and ready to use with the existing layout system, which still giving the full flexibility of code to do whatever you want. With it being a compiler plugin, they can also make it completely invalid to ever have a reference a view element instead of being signaled by its event listeners