Announcement

Collapse
No announcement yet.

Google Reaffirms Commitment To Kotlin Programming Language For Android

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • bug77
    replied
    Originally posted by kpedersen View Post
    Is its even possible to build an Android Kotlin project offline? Last time I checked, the whole system was so incredibly dependent on external information (thus non-deterministic), you could never rely on it professionally.

    Nah, NDK cross compiler and Makefiles for us. Android's "build system" (if you can call it that) and internet consumer tech like Kotlin are a waste of time.
    What do you mean by building offline? Kotlin projects are built with Gradle that does have an offline mode. But I have a feeling you're not talking about that.

    Edit: There also seem to be a number of people that actually rely on it professionally: https://www.appbrain.com/stats/libra.../kotlin/kotlin
    Last edited by bug77; 07 December 2019, 12:07 PM.

    Leave a comment:


  • kpedersen
    replied
    Is its even possible to build an Android Kotlin project offline? Last time I checked, the whole system was so incredibly dependent on external information (thus non-deterministic), you could never rely on it professionally.

    Nah, NDK cross compiler and Makefiles for us. Android's "build system" (if you can call it that) and internet consumer tech like Kotlin are a waste of time.

    Leave a comment:


  • bug77
    replied
    Originally posted by flashmozzg View Post

    It's been a thing for some time.
    Originally posted by cynical View Post

    They did that five years ago when they replaced Dalvik with ART. The compilation happens on app installation.
    Originally posted by sandy8925 View Post

    Android's had AoT compilation since Android 5.0 ...........
    Right now you get the whole bytecode that is translated into executable code upon install. I was talking about doing all that on the server (based on the phone model) and push just the resulting executable to the phone. Smaller download, less time to install

    Hell, I think it can be done for Kotlin today, because Kotlin already has a native backend. But I'm not sure how well it works for various SoCs out there.

    Leave a comment:


  • Delgarde
    replied
    Originally posted by sandy8925 View Post

    That part's optional - it's more of a convenience - if you only have a single, simple constructor with a few arguments, you can define it right there.
    It's primarily for stuff like data classes, where you're not writing a constructor as such — you're defining a set of fields with an implied constructor to populate them.

    Leave a comment:


  • starshipeleven
    replied
    Originally posted by sandy8925 View Post
    Only some apps are bloated
    Yes I know. I said Android apps are bloated because in an overwhelming amount of cases the developers are either noobs or don't care to optimize and the tools they use tend to use the "ADD ALL DEPENDENCIES" approach for the sake of helping the noob.

    Decent quality apps are more likely to be found in opensource repos like F-Droid as the developer has a better grasp of what he is doing.

    Leave a comment:


  • Guest
    Guest replied
    Originally posted by cynical View Post

    The Android SDK supports Java 8 now. I don’t see the point of Kotlin really. Modern Java is nicer to look at, it just needs support for records to get approved to help eliminate some more boilerplate and it’ll be in a good place.
    It's only supported on Android 7.0+ - Google Play itself supports a minimum of Android 4.0, and most app developers probably have Lollipop/Kitkat/Jellybean as their minSDK.

    Leave a comment:


  • Guest
    Guest replied
    Originally posted by uid313 View Post

    Yeah, and there are other weird things, like how the constructor for a class is defined in the class declaration or something weird like that.
    That part's optional - it's more of a convenience - if you only have a single, simple constructor with a few arguments, you can define it right there.

    Leave a comment:


  • Guest
    Guest replied
    Originally posted by bug77 View Post

    This will be fixed in a few years. As Java gains AoT compilation capability, I'm pretty sure Google will start compiling apps on the server side and only push the resulting binaries to your phone.
    Android's had AoT compilation since Android 5.0 ...........

    Leave a comment:


  • Guest
    Guest replied
    Originally posted by starshipeleven View Post

    Not seeing why Kotlin should be worse than Java. It basically is still Java.

    Apps on android have always been bloated as hell.
    Only some apps are bloated, because they refuse to use code and resource shrinkers. There's also APK splits, that can reduce the APK size even further, plus Google automatically attempts to compress APKs and only transfer changed files.

    Facebook is a prime example of bloated app that refuses to use standard Android tools that would heavily reduce it's size.

    Leave a comment:


  • Guest
    Guest replied
    Originally posted by tildearrow View Post
    Kotlin = 7 More Megabytes per App

    The Simple Apps are a big example of this bloat.
    Supposedly simple but actually bloated.
    That's probably because those idiots refuse to use code and resource shrinkers.

    I worked on a messaging app, and we were at 21 MB, shrink it to 16 MB by removing some unused resources and converting some PNGs to WebP. And that was without code shrinking. Of course, we hadn't tried to use Kotlin yet on that app.

    Leave a comment:

Working...
X