Hacker News new | ask | show | jobs
by Someone1234 4355 days ago
That post literally makes no sense.

Java is neither 32 nor 64 bit, it is bitness agnostic to a large degree (or at least where it matters it is, datatypes aren't really a major advantage, and most of the new CPU registers can be utilised in the JVM without the code being aware or being recompiled).

You also say that they need something "richer" (whatever that means?), "more expressive," (huh?), and "open" (even though the JVM on Android ("Dalvik") is free and open source software).

Sorry but everything you said there is either confusing or wrong. You just wanted to bring up Swift and seem to know absolutely nothing about Java/JVC/Dalvik, except that it is "old" and therefore just assume it is "bad."

I actually think C# is a better language than Java (at least in their current iterations). However not for any of the reasons you cited, for real reasons that actually make sense.

2 comments

I agree, it was pretty much buzzword fest. Here : I think the Android framework (Java + Android APIs + Android dev tools) should evolve towards something less verbose. Let's say I want to add a new type of selector in my ListView (for example for the active entry of the navigation drawer). I need to declare it in attrs.xml, use it in my layout and also to write custom versions of all the views that are going to use that selector in order to override onCreateDrawableState and inject it there, not to mention all the plumbing in different classes in order to get & set that state.. Ideally, I should be able to simply declare that state in my layout selectors and simply set it in the corresponding adapter.

There are many, many other examples where I need to modify many classes in order to do something relatively common. There are also issues with some java aspects like the enums that are syntactically very nice to use but not that good for your performances. I also feel like a caveman each time I have to write a bitfield. I should have a construct built into the language (or at least the IDE, I don't really care which one) that gives me the flexibility and type safety of enums while performing like a bitfield.

I don't know if getting rid of java is the answer here. I would not mind to, but it would be very traumatic for the Android ecosystem. I hope that these pain points will be fixed (I/O 2015 ? ^^). I don't think that Google will ever use C#. However nice it is, it is controlled by Microsoft, which is probably reason enough for Google to avoid it. There are other options though, Dart, Rust, Go, an entirely new language, ...

Value types with operator overloading. Expressive and good for performance.

Open? Java is owned by Oracle.

C# is better and more expressive than Java. Especially the functional/declarative features added after the initial Java influenced release - async/await, var, linq etc.