Wednesday, February 8, 2012

Kill Java (for C#)

I love android development.  A lot of my android love is due to the open nature of the platform, being able to delve into the source code is empowering.  Also, Google's API(s) just ooze a "developer centered" feel.  But android application development is done primarily in the java programming language, and lately I've started to realize something, I kind of hate java.  Okay, so maybe hate was to strong a word, but the loss of object and collection initializers,  delegatespartial types and methods,  and events and properties as first class citizens in the language, is starting to irritate me.

I'm not sure how this all happened.  I recall not so long ago, being almost a java fan boy.  Coming from a c and c++ background, I remember how java's garbage collection wiped away hours of hunting the dreaded "segmentation fault (core dumped)" error (not that it didn't take me some time before I stopped setting objects to null at the end of methods, you know, just to be sure... ).  But now, after using c# as my primary development language for a few years, java feels unfinished and stale in comparison.  This issue is made worse by the fact both java and c# use a similar, c-style syntax.  The syntax similarity indirectly points to a truth, that the features I listed above are more to do with the .NET run-time, than c# specifically, as they are supported in multiple .NET languages, but the similarity in syntax between java and c# adds to the feeling of loss as I develop android applications with java.  I know it's popular to hate all things Microsoft, but with the c# and the CLI specifications being maintained in the open, I promise to pretend not to notice, and to sing to the praises of these "new" java features if the maintainers of java would only see fit to merge in these additional features somehow (...you know, just quietly kill java and replace it with c#, it's so syntactically similar no one will notice, I promise).

No comments:

Post a Comment