4 ms·
I find Snowden's take on software engineering to be poorly reasoned and internally inconsistent. The most important fact related to his argument is one he does
by native_samples 5y ago
I find Snowden's take on software engineering to be poorly reasoned and internally inconsistent.
The most important fact related to his argument is one he doesn't even bother mentioning, namely that Android is mostly written in a memory safe language (Java). The thing he's asking for already exists and is deployed on most smartphones worldwide, yet all he has to say on the topic is this:
"While iPhones are more private by default and, occasionally, better-engineered from a security perspective than Google’s Android"
You cannot claim to be a spokesman for freedom, then demand memory-safe languages be used everywhere, and then praise the one system controlled exclusively by a single American firm that's written almost entirely in (Objective) C, a memory unsafe language.
That sentence is the only mention of Android in the entire article, the word "Java" doesn't appear anywhere and he seems to think that Rust is the only memory safe language in existence. Why should I care about this guy's opinions? Java has been drastically more successful than Rust when it comes to making software memory safe. Nobody is gonna choose to write the next AirBNB in Rust other than for fashion reasons, because it'd simply be too unproductive. Developers already complain about Swift and its horrible compile times, Rust would be even worse.
If Snowden really cares about this topic, he should brush up his Java skills, download some OpenJDK early access builds and start experimenting with writing video codecs and 3D engines using the new vectorization, memory span and value types features. Java is getting the capabilities to do even higher performance work traditionally dominated by C++, but in ways that preserve memory safety. The engineering is very difficult and it's unclear if Google will ever adopt it into ART, but it's there for them if they want it.
- forty 5y agoWhich part of Android is written in java? The kernel? The drivers? The JVM ? I somehow doubt anything significant of the OS itself is written in java :)
- native_samples 5y agoWhich parts? I'm surprised this isn't well known already. Large parts of Android are written in Java. Amongst other things: * All the UI libraries, networking APIs code. * All the system apps and services like the home screen, the keyboard, the system server, the window manager, the telephony subsystem (very important!) and so on. * Many of the system APIs including services like the alarm manager, dropbox manager, some cryptography services, location services etc. * The entire developer toolchain: the build system and the IDE. * All the client logic for Google Play Services, which is a big part of the overall Android API now. * Large parts of the compatibility test suite. * The standard libraries for all the above. Just browse through the code and see for yourself: https://cs.android.com/android/platform/superproject https://cs.android.com/android/platform/superproject Most of the Java code is under the frameworks directory. No, not all Android code is written in Java. Lots of devs want to be able to use C++, and for some things its necessary. The point of the upgrade projects I just mentioned is that they are tackling the remaining cases where C++ can outcompete Java for things like media codecs. And the Java world has developed a JVM written in Java, actually several of them, so whilst Google hasn't done it, the tech is actually there. All this exists today, whereas an entire widely adopted consumer OS written fully in Rust is only a pipe dream. Oh, and as for drivers, Google moved drivers out of the kernel and into user space some time ago (Project Treble): https://source.android.com/devices/architecture https://source.android.com/devices/architecture You can in fact now write drivers in Java. Google recommend you don't, but it's architecturally possible: https://source.android.com/devices/architecture/hidl-java https://source.android.com/devices/architecture/hidl-java
- pjmlp 5y agoApparently the idea that Android is a Linux distribution is hard to dispel, because most rather read what is written in some random blog posts patting their backs about "Linux victory" than actually read what is going on at AOSP and Gerrit PR.
- GuB-42 5y agoAndroid is Linux because it uses the Linux kernel. It is not GNU/Linux, which is what people think about when talking about Linux distributions. Richard Stallman is known to throw a tantrum every time someone omits the "GNU" part but now, with Android, he has a point.
- pjmlp 5y agoExcept the little detail that pisses off termux guys, neither Linux kernel nor POSIX compliance are part of public Android userspace APIs. Targeting Android/Linux, if you so wish, it is no different than targeting Windows from GNU/Linux point of view.
- forty 5y agoI guess it all depends where you make the "OS" stop :) I'd say the kernel, the drivers and the JVM are already enough to say that Android is not "mostly written in java". And that's not not to talk about whatever shit operating system is running on the modem.
- fraktl 5y agoIf you really cared about the topic, you'd see beyond your favorite language getting rekt, because let's be honest - it's shit because of people who are using it. And that's why we can't have nice things - shortsighted manchildren like you are making it impossible.
- dang 5y agoPersonal attacks will get you banned here, regardless of how wrong someone else is or you feel they are. No more of this, please. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html Edit: you've unfortunately been doing this repeatedly in your recent comments: https://news.ycombinator.com/item?id=27891065 https://news.ycombinator.com/item?id=27891065 https://news.ycombinator.com/item?id=27890950 https://news.ycombinator.com/item?id=27890950 This is easily grounds for banning you. I don't want to ban you right now, because you've posted good things in the past—but if you break the site guidelines like this again, we will have to, so please fix this. If you wouldn't mind reviewing https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html and taking the intended spirit of the site to heart, we'd be grateful.