4 ms·
Is there a reason Google didn't make the UI framework language agnostic? Had they coded the Framework API in C/C++ they could easily have made any language a fi
by bitmapbrother 11y ago
Is there a reason Google didn't make the UI framework language agnostic? Had they coded the Framework API in C/C++ they could easily have made any language a first class citizen by supplying the necessary API wrappers/facades for the languages that needed it.
- yardie 11y agoThey chose Java because it made sense at the time. Most mobile apps before the current smartphone era were Java based using j2me (or whatever it was called). Just like most iOS developers were existing Mac developers using Obj-C. Still don't know why they don't have hooks for other languages. Your option is to use NDK (I think haven't coded for Android in ages) for those that insisted on C/++
- bitmapbrother 11y agoI'm aware of why they selected Java (mindshare) for their development platform, but that doesn't exactly explain why they coded the majority of their framework in Java. Had they used C/C++ the interoperability with other languages for UI based applications would have been trivial with the respective API wrappers in place.
- pjmlp 11y agoBut they do, just those APIs aren't exposed to other NDK applications. For example, the 2D rendering engine is implemented in Skia.
- pjmlp 11y agoSymbian and PocketPC are much older than Android.
- st3v3r 11y ago"Most mobile apps before the current smartphone era were Java based using j2me" Which was routinely criticized for being absolutely terrible, second only to BREW.
- pjmlp 11y agoThe Android team is politically against anything but Java. I bet if they weren't forced by game developers to add the NDK on Android 2.2, the NDK wouldn't exist at all. Even today, Android Studio barely offers a comparable C++ experience to what xCode and Visual Studio do and Gradle support for NDK is still work-in-progress that doesn't support all ndk-build features.
- bitmapbrother 11y agoAndroid Studio has C/C++ support courtesy of CLion. Are you implying that CLion is really inferior to xCode? I find that very hard to believe. As for CLion and VS, well, last time I installed VS 2015 it sprayed 30GB of files all over my SSD. To say VS 2015 is a pig would be an understatement.
- pjmlp 11y agoYes I am, the C++ developer experience in Android Studio is a second class one, even when compared to xCode. Since I also have Windows customers I have VS anyway on my hard disk. Microsoft is offering better support for Android development in C++ that Google seems capable of doing. Android Studio is unable to make use of And and ndk-build like Visual Studio does, offers a crippled experience in terms of intellisense and debugging tools versus Visual Studio support for Android NDK development. Also the Android team seems unable to make Gradle match 1:1 the ndk-build features. Still catching up, after deprecating Eclipse CDT + ndk-build almost 2 years ago.
- on_and_off 11y agoThe first plan was to support 3 languages : -Javascript for small apps such as homescreen widgets -Java for more complete apps -C++ for the cases where its power is necessary. Along the way they dropped Javascript since they decided that Java was not too bothersome to write Android apps in, even small ones. They have also restricted C++ to the NDK. These decisions have been taken a long time ago though. If somebody were to create Android today, the landscape has changed a lot since then. Swift, Kotlin, Rust, C#, ... there are a lot of new developments.