14 ms·
Nice. Now please make C# a first-class citizen in Android and start to migrate from Java to C#.
by mentat2737 10y ago
Nice.
Now please make C# a first-class citizen in Android and start to migrate from Java to C#.
- xeromal 10y agoThat would be dope! I'd kill to have WPF ported over too!
- JustSomeNobody 10y agoOh please no. Not a fan of WPF.
- AlexDanger 10y agoI thought MS was (quietly) killing WPF and burying it next to Silverlight? Not soon enough I think. Nice idea, headache inducing implementation.
- youdounderstand 10y agoUWP and Xamarin apps can use XAML, so it's not like the underlying ideas of WPF/Silverlight are dead.
- ygra 10y agoWPF is a lot more than just a markup language for object graphs. Heck, the features I consider most essential and important to WPF (data binding, templating, and the idea that controls only encapsulate behaviour) have nothing to do with XAML at all.
- youdounderstand 10y agoBoth UWP and Xamarin Forms have all of that.
- nightski 10y agoBut aren't all those features you mentioned part of UWP also?
- Grazester 10y agoWhat exactly would be the benefit of this?
- Longhanks 10y agoNo more problems with Oracle, C# features that Java is missing, such as type inference, proper generics, built in concurrency, operator overloading, first class optionals, ...
- Grazester 10y agoTheir move to Open JDK should do away with the oracle issue no?
- pjmlp 10y agoThey are just cherry picking features, check the AOSP.
- michsanders 10y agoNo more problems with Oracle, but what about Microsoft? Today we have the "cool" CEO, but that may change in the future. Remember Android started when Java was in Sun Microsystems' hands. 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.
- justin66 10y agoUsing a language not in the hands of Oracle.
- johncolanduoni 10y agoBetter support for mixed managed/native code for one. There's P/Invoke, and .NET's byte code includes instructions for low level pointer manipulation (which C# exposes). You could even compile C/C++ to CIL and obviate the need for some architecture specific binaries.
- treehau5 10y agoNo thanks. I like Java, and esp Java 8 just fine.
- kentosi 10y agoOr have both. What's in Java 8 that isn't in C#? And last I checked you couldn't use Java 8 fully on Android (please correct me if I'm wrong).
- johncolanduoni 10y agoYou are painfully correct...
- daxfohl 10y agoAnonymous classes are the big thing I miss. (Yes C# has a feature called "anonymous classes" as well, but it's completely different).
- TheCoelacanth 10y agoWhat do you still use those for? I can't remember the last time I saw an anonymous class used in a way that isn't superseded by lambdas.
- daxfohl 10y agoYeah, I was thinking about that when I wrote the comment. They were most useful for `Observable` objects for event handling in swing; you don't really need that with C# events. There are still uses though. Lambdas are the future, but there are lots of OO-first libraries that are still quite popular. It'd be nice to create e.g. `new Newtonsoft.JsonConverter() { ReadJson() {...} WriteJson() {...}}` etc on the fly sometimes without needing separate classes. It's possible in F# though, so nothing dotnet specific is preventing it.
- jdmichal 10y agoI use them all the time for defining singleton implementations. public static final MyInterface SINGLETON = new MyInterface() { ... }
- ksubedi 10y agoThat would be great!
- sandGorgon 10y agothis. or atleast acquire jetbrains and make kotlin the standard.
- nine_k 10y agoOnly please don't acquire JetBrains. Being acquired by Google is like being contacted ny the Borg.
- praveenster 10y agoIn addition to that it might be a good idea to make Swift a first-class citizen too. This would give developers a good chance to use similar concepts on both iOS and Android.
- shaydoc 10y agojust make C# a first class citizen on iOS also :)
- batina 10y agoYes, that would be awesome!
- my_ghola 10y agoDoesn't Xamarin compile C# to Java/Dalvik bytecode already?
- calt 10y agoThere's a big difference between being a supported first class citizen and having a hacked together ecosystem that Mostly Works™. After my experience with Mono on past .NET versions, I'm skeptical of any of these "compiles to x" schemes.
- Kipters 10y agoNo, they compile to IL and run it with Mono (embedded as a native lib). Optionally you can AOT-compile it to native code.
- geodel 10y agoGoogle have not made their own languages Dart/Go official to Android. Why would they make languages other than Java a priority now?
- jahnu 10y ago* C# is much more mature * 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.
- geodel 10y agoOne possible way out will be something like Swift port to Android made by an open source contributor to Swift. Someone with deep knowledge of C# can take a stab at C# to Android. I'd think Google have very few C# people internally.
- problems 10y agoThere already exists C# for Android, it recently became free too when Microsoft bought up Xamarin (the company formerly maintain Mono and the Xamarin Android and iOS wrappers). Microsoft is really pushing .NET Core and the open .NET platform, really an awesome move for developers. What the parent wanted was official support from Google for Xamarin's Android API wrapper or a complete rewrite of core parts of the OS in .NET instead of Java. It seems fairly unlikely because of all the effort Google has invested in their Java VM and JIT/AOT compilers, but maybe that'll change.
- geodel 10y agoI agree with most of it. But I personally think .net/C# simply to not bring enough advances over Java to even think of changing core parts. Most advantages that get mentioned are app developer conveniences.
- dizzy3gg 10y agoThey have Jon Skeet, this is enough, at least to attract more c# developers.
- cryptarch 10y agoPlease just make C-ABI's first-class citizens (especially on the GUI front), then all other languages can bind to that.
- saosebastiao 10y agoThis is the only approach that works across a wide variety of languages, and yet I can't help but think that would be a terribly bad idea in terms of user experience. Because you would end up with major apps written in Ruby or Python, draining batteries and stealing all your RAM. Not that we aren't already headed there with a ton of app frameworks embracing javascript.
- jimmaswell 10y agoApps written in python would still take less battery than an equivalent JS webapp
- int_19h 10y agoC ABI is very limiting, though, and it's a pain to implement. 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.
- cryptarch 10y ago... so, a C-ABI + per-language wrappers, or perhaps a high-quality cross-platform, multi-language wrapper generator? That effectively accomplishes what you're describing in your second paragraph. 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).
- deleted 10y ago[deleted]
- yulaow 10y agoPersonally I would much much more prefer a switch to Kotlin than to C#. And I bet, after the collaboration for android studio, Google and JetBrains are already working on it
- robynsmith 10y agoIs the C# runtime open source?
- Strom 10y agoYes, you can find it on github. [1] [1] https://github.com/dotnet/coreclr https://github.com/dotnet/coreclr
- guelo 10y agoIf you want to make C# apps you already have Windows Phone and now Tizen.
- MattRix 10y agolol
- pweissbrod 10y agoI agree that C# would be a step up, it's not a big enough difference to justify a migration. Also the cross-platform tools aren't good enough yet
- crb 10y ago"Google Cloud" joined, not "Google". https://cloudplatform.googleblog.com/2016/11/Google-Cloud-to-join-NET-Foundation-Technical-Steering-Group.html https://cloudplatform.googleblog.com/2016/11/Google-Cloud-to...
- jeremy_wiebe 10y agoI don't think that's a relevant distinction. The article you linked to references both and uses wording like this ( mine): 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.
- bitmapbrother 10y agoI'm sure they'll get on it right after Microsoft stops extorting Android OEM's that can't afford to fight their BS patents. Also, Google joining the .NET foundation was a cloud move. Nothing more.
- on_and_off 10y agoWhy ? what does it bring that Kotlin cannot ? 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.
- wesamco 10y agoI doubt it's going to be a first-class citizen like Java anytime soon. 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 https://github.com/dotnet/corert [2] https://www.tizen.org/blogs/dh0922/2016/tizen-.net-developer-preview https://www.tizen.org/blogs/dh0922/2016/tizen-.net-developer...
- ygra 10y agoWhere did you get that they compile C# to C++? I thought .NET Native was compiling to machine code, maybe with IL in between, but certainly not via another high-level language.
- wesamco 10y agohttps://github.com/dotnet/corert/blob/master/Documentation/intro-to-corert.md https://github.com/dotnet/corert/blob/master/Documentation/i...
- michsanders 10y agoWhat for? I don't think that would be an improvement at all.
- lincar 10y agoJava is a better language. The one Microsoft copied to create C#. The JVM is a better .Net than .Net is and has been since the start.
- Zigurd 10y agoAndroid is deeply dependent on a runtime with Java semantics. The only realistic hope for an implementation language other than Java would be a VM language like Scala or Kotlin. Kotlin is a semi-official alternative, since it is supported by the IDE technology provider. 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?