595 points · by ickler8 · 10y ago · 332 comments
Now please make C# a first-class citizen in Android and start to migrate from Java to C#.
Moving android away from Java is going to be a big undertaking and I doubt Google will undertake such a huge project only to move away from Oracle and closer to MS.
If they ever try to replace Java, it'll be Dart or another language they acquire in future. Dart has good chances.
They already have an early stage framework to make Android (and iOS) apps with Dart[0]. It's also the main GUI toolkit for their Fuchsia OS [1].
* - based on the premise that MS might be open to this after failing at mobile over and over again
I love Go, but it's not really a suitable language to do UI, or anything that deals with data models.
C#, however, is a perfect replacement for Java, most of the times. I would say "it's simply superior in every imaginable metric other than cross-platform implementations of the compiler/VM" but that's just my opinion.
Not by a big margin. Java 8 has lambda functions, which used to be the most painful aspect of the language for me.
* It has an enormous user base
* It's not owned by Oracle
Not saying they will but those are real possible reasons for Google to do this.
So you replace one lawsuit-happy DB company with... another lawsuit-happy DB company.
Maybe Google could decide that putting resources on Dalvik and related tool development does not make sense.
Maybe they would like to see one language to cover both the client and cloud development.
Because mentat asked please.
In other words, it might have less to do with the merit of the language than with the politics of the organization.
In this spirit of enabling developers and their organizations, Google is pleased to be joining the Technical Steering Group of the .NET Foundation. .NET is a key component in the modern enterprise, and the Google Cloud Platform (GCP) team has worked hard to ensure that .NET has first-class support on Google’s infrastructure, including excellent infrastructure for Windows.
What's really needed is some standard higher-level ABI (that does things like classes in a sane way), but which is made out of the existing C ABI building blocks in a manner that allows any existing language with C FFI use it. We can then add a new FFI layer that maps higher-level concepts better, but everyone can still play regardless.
This is exactly what COM was, and what its current evolution, WinRT, is. Any language that can do C structs and function pointers can ultimately do COM/WinRT, but it establishes things like lifetime semantics (refcounting), runtime metadata API, standardized futures etc on top of that. Then languages take that and map it to things that make sense there.
But it needs to be a shared public spec, preferably standardized.
Either way, it'd be great if one could implement efficient GUI's (and full apps more generally) on Android in C/C++/Go/Rust without having to generate JVM bytecode on the fly (or like Xamarin does: at compile time).
Not that we aren't already headed there with a ton of app frameworks embracing javascript.
I like C# but making a language a first-class citizen of a platform is an huge task. And we can already use kotlin without re-engineering the whole stack.
Likewise Java's OOP enums (basically singletons) are something I miss too.
That's a few small features I notice missing when I switch to C#.
Plus, in general I find there's a difference in style. C# libraries tend to be more pragmatic, following on Microsoft's heavy use of reflection and stringly-typed stuff. Not much OOP navel-gazing.
Java, on the other hand, celebrates OOP to a ludicrous extreme.
Also on the community, C# has been working very hard to develop the kind of bazaar that Java has, but they're coming from far behind on that front - far more C# developers restrict them to the first-party tools compared to the Java ones.
So, yeah, go away because that's not contributing to the conversation.
Paul Graham once said [1]:
I think it's ok to use the up and down
arrows to express agreement. Obviously
the uparrows aren't only for applauding
politeness, so it seems reasonable that
the downarrows aren't only for booing
rudeness.
It only becomes abuse when people resort
to karma bombing: downvoting a lot of
comments by one user without reading
them in order to subtract maximum karma.
Fortunately we now have several levels
of software to protect against that.
[1] https://news.ycombinator.com/item?id=117171Many have taken this to mean that down voting a comment when they disagree with the opinion therein, no matter how well it argues that opinion and no matter how much it contributes to the conversation, is fine.
A credible threat of Google moving Android away from Java is the best hope we have of this situation ever improving.
Operator overloading is probably the worst feature ever invented, same with Class Extensions, reducing readability of code.
And with a switch to C# Google would neglect the Java ecosystem on Android, requiring us app devs to rewrite everything again.
I’m not sure there’s an upside to switching to C#.
And last I checked you couldn't use Java 8 fully on Android (please correct me if I'm wrong).
Also, Google joining the .NET foundation was a cloud move. Nothing more.
there is a lot of Innovation going on, with the new open source .NET. the CoreRT[1] project compiles C#->C++->Machine code for any platform, including ARM. and Samsung has been a big contributor to make that happen. and today during the Connect() event, they announced that every Xamarin forms app will run on Tizen[2].
[1] https://github.com/dotnet/corert [2] https://www.tizen.org/blogs/dh0922/2016/tizen-.net-developer...
C# is close enough that ART could likely be extended to encompass it. But it would be somewhat more work than supporting an actual JVM language.
BUT the real question is, with modern IDEs, does it matter? How much do you need a prettier and/or more concise language? And if you do, why not Kotlin?
Apart from that, C# and Java are not very different from each other. You can get many of that "features" from other Java languages, no need to move away from the JVM, so you can still benefit from the largest community.
You could even compile C/C++ to CIL and obviate the need for some architecture specific binaries.
EDIT: Instead of downvoting, please point out how LINQ is actually superior?
After my experience with Mono on past .NET versions, I'm skeptical of any of these "compiles to x" schemes.
The technical steering groups is currently formed out of: Microsoft, Red Hat (so input from the main Linux distro), JetBrains (input from the makers of great tools for developers), Unity (one of the leading game engine makers), Samsung (one of the leading mobile device makers) and now Google.
.NET should have a bright future. And hopefully this should push a few buttons over at Oracle HQ so that Java catches up faster to C#.
Not that a shot in the arm wouldn't be good for Oracle, but Java definitely still reigns supreme at the moment, despite Oracle's involvement.
Props to Satya Nadella for having the gumption to lean into this strategy. I was expecting a few token open-sourcish libraries as a giant marketing campaign, but it looks like they're really committed to the idea.
Build 2016 is probably THE defining moment for developers that have previously shied away due to their inherent closed, proprietary nature.
At least for me anyways, AWS seriously needs a killer IDE like Visual Studio's tight integration with Azure.
Please, please die WiX. Imperative XML + non-deterministic execution order + the worst error messages of the entire stack. I love C# and the CLR, but damn WiX sucks.
I was strongly suggested to use WiX. I spent 2 months trying to get something to work, but I wasn't able to get nothing truly useful to run. I remember explicitly that something as simple as writing to the registry was proving problematic. To make it worse, documentation was poor, and there wasn't much of a community around it cause it was brand spanking new.
Two months in, without telling anyone, I decided to ditch it and use NSIS. That day I had something that actually worked! Within 2 weeks I had something that was running end to end, installing the software on the machine. The next month was polishing, and testing/fixing for different versions of Windows.
I have no idea how things may have changed now, but if I tasked with making a Windows installer today, I wouldn't even think twice about using anything other than NSIS.
For the server side there's octopus, which I've been very impressed by, also done via nuget packages.
The Windows Phone 8 to 10 transition lost a lot of people, myself being one of them. There are very few Windows Phone 10 handsets being produced, especially if you are looking for "flagship" quality.
Why do you believe otherwise?
But maybe you're right - it's been a few years since I made a looked at the comparison.
I'm not sure that this actually implies it was a more robust and production ready system. The JVM seems to be on a similar path of reducing somewhat how much tuning is expected of operators. Certainly we do less of it now on Java 8 (although some of the defaults it sets are truly boneheaded).
But as others pointed out, Android is not built on the JVM, but on Java. Java != JVM.
And the CLR is a pretty great VM too. It's performance isn't as great as the JVM, but it's darn close, while also offering a lot of ease of use over the JVM.
As far as I understand it, it was a design goal for the CLR to not require those configuration options.
In fact, a lot of the design of both the CLR and C# can be easily traced to various shortcomings and pain points of Java (type erasure, value types, versioned modules, exceptions in method signatures etc).
Microsoft joins Linux foundation and has a seat on the board
Google joins .NET foundation
Trump is president of the United States
I really hope Microsoft understand that if we made the move to C# they have a brilliant opportunity to set the standard for how to behave.
(Meanwhile, I'm in the process of using Go for projects)
https://softwareengineeringdaily.com/2016/09/20/cloud-client...
Of course, this would only work if they switch languages, which I don't see the Android team doing willingly without upper management "help".