Michal Bacik
10/29/2019, 4:19 PM@Compose
methods starting with uppercase, when Kotlin has lower-case rules for functions? Kotlin lists exception for factory function creating class of same name, but this is not case of Compose.
And Compose uses upper-case for its functions, and it's even not tagget in IDE with warning, while ordinary functions show correct warning.
https://kotlinlang.org/docs/reference/coding-conventions.html#naming-rulesFudge
10/29/2019, 4:27 PMMichal Bacik
10/29/2019, 4:34 PM@Composable
annotation mutes IDE warning for these functions. Is this hardcoded in Studio?spierce7
10/29/2019, 4:43 PMMichal Bacik
10/29/2019, 4:50 PMshikasd
10/29/2019, 4:50 PMChannel
as well.alexsullivan114
10/29/2019, 5:03 PM@Composable
methods are the only methods that can construct Composables, and they represent discreet chunks of UI logic that we'd typically see in a class before Compose, so I think it makes sense to have them as uppercase. Otherwise it's very challenging to tell what's adding UI and what isn'tromainguy
10/29/2019, 5:07 PMMichal Bacik
10/29/2019, 5:11 PMLuca Nicoletti
10/29/2019, 5:19 PM@Composable
Adam Powell
10/29/2019, 5:50 PMandrew
10/29/2019, 5:54 PMpavi2410
10/29/2019, 9:37 PM@Composable fun `MyButton is a function, not a class!`() {}
How about this?alexsullivan114
10/29/2019, 10:18 PMghedeon
10/30/2019, 5:32 PMList()
Ryan Mentley
10/31/2019, 3:09 AMalexsullivan114
10/31/2019, 11:37 AMpajatopmr
06/26/2020, 7:36 PMAdam Powell
06/26/2020, 7:50 PMdeclareColumn
, declareButton
, etc. 🙂pajatopmr
06/26/2020, 7:52 PMpavi2410
07/01/2020, 9:18 AMJoost Klitsie
07/23/2020, 9:27 AMgildor
07/23/2020, 10:01 AMpajatopmr
07/24/2020, 6:12 AMdeclareRow()
or declareText()
, although possibly tiresome, will not elicit quite so many WTF moments from readers of the applications or libraries using composable functions. A lot of energy is going into reacting to, explaining and justifying this unfortunate AOSP decision. But then, they are writing the code so it is their decision to make. They have heard the complaints registered and dismissed them. Perhaps they do know better than those of us having our WTF moments.romainguy
07/24/2020, 6:45 AMJoost Klitsie
07/24/2020, 6:59 AMromainguy
07/24/2020, 7:02 AMJoost Klitsie
07/24/2020, 7:07 AMromainguy
07/24/2020, 7:10 AMpajatopmr
08/04/2020, 2:40 PMJoost Klitsie
08/04/2020, 3:44 PMgildor
08/04/2020, 4:09 PM