Arman Chatikayn
07/07/2019, 1:15 PMFudge
07/07/2019, 1:44 PMsimon.vergauwen
07/07/2019, 1:49 PMstreetsofboston
07/07/2019, 2:33 PMbierocracyLove that word 🍻 😆
louis993546
07/07/2019, 8:21 PMmiha-x64
07/08/2019, 9:02 AMcompose fun
doesn't mean anything. Functions are already composable building blocks, there's nothing you can add here.
While @Compose fun
screams at you: 'SOME BAD CODE RIGHT HERE! There's some reflection/codegen/transformations because abstractions are done wrong!'
Thus, annotation is significantly better here.Ryan Mentley
07/08/2019, 9:34 PM@Composable
annotation. There are codegen/transformations though.miha-x64
07/09/2019, 7:48 AMTristan Caron
07/09/2019, 2:18 PMfun RBuilder.button()
. Something like Composable.Button()
might have been considered, but I am not sure if it works well for codegen. I guess the compiler is doing some optimizations and create some template functions like Ivy (Angular).
Will the IDE be able to know that we are in a @Composable
or not, and allow or disallow some code?miha-x64
07/09/2019, 2:37 PMSrSouza
07/09/2019, 5:36 PMRyan Mentley
07/09/2019, 11:18 PMWill the IDE be able to know that we are in aYes, this already mostly works. You can't call composable functions from outside a composable function.or not, and allow or disallow some code?@Composable
Something likeIt was indeed. There's some discussion here: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1558458471177900?thread_ts=1558440714.121300&cid=CJLTWPH7Smight have been consideredComposable.Button()
Tristan Caron
07/11/2019, 2:24 PM@Composable
with something like #[derive(Composable)]
? https://doc.rust-lang.org/1.15.1/book/procedural-macros.html So, maybe instead of introducing a new keyword just for compose, maybe it could be interesting to make codegen something integrated to Kotlin compiler. I don’t really know how it works today, but my guess is, if we want to use code generation, we have use an external lib, and run something like gradle codegen
as much as it’s necessary. But for compose
, it’s doing codegen on its own, and we have to use a plugin to ensure a good development experience.pavi2410
07/11/2019, 4:02 PMRyan Mentley
07/11/2019, 9:25 PMdewildte
07/12/2019, 2:17 PM