• NotMyOldRedditName@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    5 hours ago

    Its’s not that hard to get to that many lines once you consider imports might be the first 50-100 of a file. One of my UI files the imports are the first 180 lines almost all of them from the android sdk. At least in Android dev.

    Then with something like declarative UI frameworks, you might end up with something like 8 lines to show 1 thing of stylized text so it’s all formatted cleanly with localized text, let alone trying to position it anywhere.

    Like this example clickable text is 12 lines to function ignoring the actual imports for the UI element itself.

    Text(
      text = "Tap me!",  <--- add 2 extra lines for localizing it + importing it
      color = someTextColor,
      fontSize = 15.sp,
      modifier = Modifier
          .padding(16.dp)
          .clickable { println("Text clicked!") } <--- add 2 extra lines for localizing it + importing it
    )
    

    I have ~1000 localized strings in my app, so that’s 3000 lines right there just writing and importing them if they were only each used once.