Android Ported To C#
New submitter Eirenarch writes "Xamarin has just announced that they got the Java part of Android ported to C# via machine translation. The resulting OS, called XobotOS, is available on Github. They claim some serious performance gains over Dalvik. For them, this is an experiment that they are not planning to focus on, but they will be using some of the technologies in Mono for Android."
....this still won't save you from the Oracle software apocalypse.
Brace for inevitable flood of fanboys and flamewars. This one is going to set off both the open sores zealots and the fandroids.
I'd like to try them sometime.
My AC stalker: " I personally agree with your posts most of the time, but that won't keep me from modding you troll"
Android ported to microsoft patent trap
with all the letters in the ascii table why can't you get past C http://www.asciitable.com/
I got to the chocolate box before you, that's why the hard ones have teeth marks.
So what's the point?
Well, relatively easy, since at a bytecode level Java is a subset of CLR.
Now just try going from C# to Java.
There's no -1 for "I don't get it."
This may not matter. If the litigious bastards at Oracle have their way, future Android builds will migrate to "all native code" just like on the iPhone and other non-vm based devices. They'll just sadly set aside Dalvik and declare ARM to be the official ISA of Android phones, or do some crazy thing where applications are compiled (perhaps in the cloud?) before installation to a device. I don't see C#/CLR/Mono becoming part of the Android stack, not now, not ever. Google wouldn't abandon one third-party managed code environment only to embrace another. Perhaps what Google should do is settle the case: "We will pay you a royalty for every Android if you make Microsoft go away."
Tired of FB/Google censorship? Visit UNCENSORED!
I'm currently trying to learn the WPF in C# for a project and it just makes my life difficult! The combination of MVC, XML, LINQ and routed events just broke my ability to do real programming. You will really find yourself spend hours trying to do simple tasks and end up hacking up some weird solutions that will make your project into spaghetti code (talking about large projects at least).
game plan: Oracle's copyright lawyers fight Microsoft's patent lawyers over who gets to destroy them first. lawyers kill each other and the whole world wins?
Then, when that happens, I can do anything anywhere and everywhere, and not just run, either !!
Next wish: GoSub for Forth !! Now we be cookin !!
It seems like they are "translating" the Java code to C#, then compiling it with Mono. I had expected support for running Android bytecode, or something like that...
I'm waiting for the COBOL port...
Look, if you're going to troll that's fine. But at least make your trolling remarks internally consistent; first you complain that Mono requires Windows to run, then you claim it's unnecessary to create a fully FOSS CLR runtime.
Well, Windows is obviously not FOSS, so your two claims are mutually exclusive.
Or to put it another way: lern2trol.
There's no -1 for "I don't get it."
Android on Pascal++
It's neat that Xamarin used machine translation to port Android, but the hype is silly. There have been several Java -> C# translators out there. Microsoft used to provide one. IBM iLog open sourced their translator. I know it's much more fun to re-invent shit and hype it like a crazy car salesman, but Xamarin is smoking crack. There's nothing new here. Over the last 15 years, there have been a few products that could translate C/C++ to Java. Glad to see Xamarin still has NIH syndrome.
Wasn't Larry Ellison a good friend of Steve Jobs? Is it possible that the whole Oracle Java thing is simply 'Steve Job's going thermonuclear' on Google/Android?
C# is a far superior language, and I would much rather work in Visual Studio then tear my eyes out everyday dealing with Eclipse.
AccountKiller
The chart from TFA:
http://tirania.org/s/71de890b.png
Whoa. Those benchmarks show Java/JVM about 7 times slower than C#/DLR. (I thought "DLR" in TFA was a typo, but it's correct. DLR stands for Dynamic Language Runtime.)
I'm not entirely surprised. I remember reading the history of IronPython, where Jim Hugunin (the original author of Jython, which is Python running on the JVM) did some experiments with the CLR, intending to prove how sucky and lousy the CLR was; instead, he found that the CLR was faster than the JVM, and he went ahead and created IronPython to run on the CLR.
steveha
lf(1): it's like ls(1) but sorts filenames by extension, tersely
"Do no good" vs "do as much evil as you can get away with"
Will Microsoft be coming after Xamarin for the Android tax?
AccountKiller
One fatal flaw with C#, it's Windows only, Mono not withstanding. So, who cares?
The ability to create stack-allocatable objects, give them their own functions, and access them by reference instead of by value if you wish... Yeah, these are features of a good language.
Java has primitives (stack-allocated, can't invoke functions on them, can't add your own, can't add any sort of complex type). C# has a sub-set of its "structs" that are simply slightly fancier versionns of the Java primitives, plus some more complex structs. If you don't *like* your Point to be a pass-by-value type, use Nullable (which is conveniently available in shorthand Point?).
C# also has a number of types that Java could stand to pick up, like unsigned integer types. Especially when working with native code, which is sadly a requirement of a number of real-world programs, the lack of unsigned types in Java is messy.
Delegates are exactly type-safe function pointers. The concept of calling them "unsafe" is ridiculous. In what possible way are they unsafe?
You don't have to write properties. They're handy at times, but are completely optional. Having lots of Java-style
public fooType getFoo() { return this.foo; }
public void setFoo(fooType f) { if (validateFoo(f)) this.foo = f; }
public barType getBar() { return this.bar; }
functions is hardly shorter to write, and doesn't seem any easier on the user of your API either. You can certainly do it that way if you want, though; C# won't stop you. Java will, however, prevent going the other direction...
Java's generics system is just broken. This becomes especially apparent if you want to create an array of any generic type. The existence of a separate namespace for the generics classes may seem awkward at first, but the actual experience of using a well-designed generics system is well worth that little bit of hassle.
A few other points:
There are good uses for operator overloading. Not the extremes that C++ takes it to, but things like being able to implement an addition operator for a numeric type, or a multiplication operator for a vector times a scalar, or other intuitive uses.
Somewhat similarly, another aspect of peroperties, being able to define your own index operation is really nice (there's no good reason why ArrayLists and Arrays need different syntax to use them; in C# they don't).
Being able to define both implicit and explicit casts manually is lovely. Yes, you can still use
public bazType toBaz()...
functions, but if it makes perfectly good sense that somebody might want to use your type as a bazType, and it's safe to do so, why not let the cast be implicit?
The existence of the "preprocessor" in C# is great. Your debug code isn't even compiled into your release binary, resulting in more compact files and better runtime performance without needing to maintain debug branches (debug being merely an example here, but one of the most common). No C-style macros, though - both a blessing and a limitation.
Out and Ref parameters... the ability to return multiple values from a function call is incredibly handy sometimes. It's never technically mandatory to implement an API this way, but it's frequently convenient.
P/Invoke (DllImport) is an incredibly easy way to call native code from managed code. Of course, it requires that the managed code support the same types and behaviors as the native code, or directly analogous ones, so things like unsigned types and user-defined structs and out parameters do become quite beneficial again...
There's no place I could be, since I've found Serenity...
JVM beats Dalvik and Mono VM in speed, but uses a lot more memory.
Performance alone means nothing. A mobile can't use 100Mb per process.
It all ends badly. It always ends in broken apps that need a rewrite. Or in court. Or in big fees.
It's not about programming and programmers. Its about creating valuable, unencumbered, portable, long lived assets. Do they build F1 cars out of duct tape and cardboard because it is easier on the constructors? Are the pyramids built out of Nerf because it is lighter than stone and easier on the slaves?
Either you code in C, or you do not. All the rest is folly. But don't take my word for it. Reality is a hard, unforgiving mistress, a sadistic bitch that will take great joy beating this into you.
if the FBI guys just stayed home for a few days? My guess is very few, actually.
I failed to include the squashed packages. Mine was pretty much a full CD (~700 MB).