Hacker News new | ask | show | jobs
by on_and_off 4351 days ago
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, ...