Thread
#compose
    Gabriel Feo

    Gabriel Feo

    2 years ago
    Just out of curiosity, is it a convention from somewhere to name constants in UpperCamelCase? This is from
    Constraints2
    I think I like it
    Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    2 years ago
    I believe the Kotlin style guide recommends either this style or SCREAMING_SNAKE_CASE, but the Android-specific kotlin style guide narrows that down to just screaming snake.
    Gabriel Feo

    Gabriel Feo

    2 years ago
    Lol that name pretty much describes my discomfort with naming constants
    Adam Powell

    Adam Powell

    2 years ago
    Yeah we've been doing this across compose and will likely update the Android kotlin style guide to match. It doesn't make much sense to have SNAKE_CASE for some "constants" when you also have
    object
    and sealed classes where some members are
    object
    Or a top level
    val
    initialized as an expression vs a top level
    object
    m

    mzgreen

    2 years ago
    Will we get classes named like Constraints2 at launch? Or do you plan to clean this up in the future?
    Adam Powell

    Adam Powell

    2 years ago
    Nah those will replace the old ones and get renamed. The nice thing about pre-alpha releases is we can break APIs with abandon 😁
    Mostly we're trying to use the kotlin deprecated/replaceWith facilities to make keeping up with the changes easier. Our first few releases were pretty rough so we're trying to do better gradual migrations
    But since we do our own CI with warnings as errors, if we deprecate we have to also migrate our whole codebase at the same time. Good and realistic incentive but it takes a little time
    m

    mzgreen

    2 years ago
    Yeah makes sense, thank you 🙂