Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's a lot wrong with Java, but even while having moved on and learned / used professionally many other languages I keep coming back to it and its ecosystem. There is still not another language / platform that provides the same level of a variety of things that are important to me:

    * platform independence
    * performance
    * low level features
    * simplicity and clarity (for reading, writing not so much)
    * infrastructure/tools (IDE, visualvm, etc)
Admittedly, I lean more and more into JVM languages like Groovy and Scala these days. But even then I still drop into Java to write parts of the code that I want to be as fast as possible.


You can get all of that and clearer writing in c#, with Intellisense.


I hope I get no down votes from the following comment. This is not true, C# can be thought as superior to Java, only if you intend to be completely immersed in the Microsoft stack and this assertion is still debatable. I personally like Java more than C# just because Java is truly platform independent and fully open source. When you have two similar software products the one which is open source will always be a better choice. I think Java has a bright future.


To be fair, Mono exists, and contains a free implementation of C#.


I have done less than 10 hours of .NET programming in my life so I have no idea here... but my impression is that MONO substantially less accepted than a standard Java port... not trying to bash, just explaining my view. I'm moving a significant production Java app from a Linux box to Windows in the next 3 months. My expected work is about 2-days, and frankly my management wouldn't expect more, and I'd have a hard time justifying more (it's probably padded already... don't tell). The portability of Java apps is wonderful. I'd guess MONO could do the same thing, Windows to Linux, but just explaining the run-time to my management or Change Management would require testing, which is cost, which is probably waste, but is also necessary... a Oracle JVM on Linux or Windows, doesn't require the same due diligence.


Unity is probably the biggest commercial use of Mono: http://en.wikipedia.org/wiki/Unity_(game_engine)


Xamarin is more likely.


I have done less than 10 hours of .NET programming in my life so I have no idea here... but

Then don't comment. Your comment is comparing something you know to something you have no idea about. How can anyone legitimately make such a comparison?


I can tell you I've done 10 minutes of C# programming in my life, while addressing a StackOverflow comment, and in that 10 minutes I found something that worked on Microsoft's .NET runtime but not on Mono. You don't need experience to find evidence.


True, but you can't spruik that and then tell us in the next breath about the wonderful developer tools and Intellisense, etc., because most of that doesn't exist outside Windows. With Java it's not just the JVM that is cross platform - the whole developer ecosystem and culture is from the ground up. Every IDE, every compiler, every tool, all runs on every platform. It has it's holes, but largely Java actually achieves this, which when you need it, is a huge win.


Xamarin is wonderful. There's a huge .NET OSS ecosystem out there. You might be surprised with what can be done with it.

http://xamarin.com


Unfortunately it looks like xamarin has completely abandoned linux as a platform.


Citation please?


OT:, pardon this non-native, what does "spruik" mean? I can only find this[0] but it seems an intransitive verb compared to what you used

[0] http://dictionary.reference.com/browse/spruik


Heh, I didn't even realise it was Australian slang. The meaning from your link is correct - to sell, extoll the virtues of or try to convince other people to buy something.


English. spruikers are the guys at open air markets screaming out the virtues of their wares.


MonoDevelop is far from bad, actually. And cross-platform.


Of the language, not the libraries or tooling.

A language is much more than just syntax.

With mono, one ends up writing C# code similar to C and C++, with #ifdefs, or having to search for .NET libraries that are cross platform.


Those cases are inherently platform specific and are impossible to abstract completely.

UI for example. Pure Java UIs plain suck; you can use Gtk# in C# for the same thing, but none will be up to the platform's UI standards.

Besides, the JVM isn't available on iOS and Android, so it isn't universally available either.


Java is actually used heavily on Android.


On Dalvik not JVM.


Infrastructure of Mono is not in any way comparable to proper c#. Also how come MonoDevelop's latest version doesn't work on Linux? On Windows it became Xamarian and it is ok ish, but I would not use it for a major project, refactoring tools are more or less non existant. On Linux they are stuck with the old version of MonoDevelop


What do you mean it doesn't work on linux? It works fine. It helps to use the distro (opensuse) the mono developers use.


MSFT could shut down Mono anytime it wants.How many business use mono (to build web apps) in production?

Scala,Groovy,Xtend,etc... there is enough languages on the jvm one doesnt have to use any MS related tech.


How so? C# is a standardized language.


Only partially. Microsoft has stopped submitting language updates to ECMA.


Source citation please?


On what grounds?


Doesn't C# have "magic" getters and setters, where code like "foo.bar = quux;" might mean a function call? To me, that's not clearer at all.


Yes. However, C# uses the convention that capitalized "fields" are actually properties, and lowercase ones are true fields.

For example, Foo.X might be an x position, returned from a getter method, and set with a setter method. Internally, the class make use the Foo.x field to store it, in which case the getter and setter are trivial. In fact, C# will write them for you The property could look like:

    int X{
        get;
        set;
    }
(Though my syntax might not be completely correct, I haven't used C# in a while). C# will automatically create a private field to store the value for x, and the getter and setter will work as expected.

Classes should, as a general rule, only expose properties and methods to the outside world. All fields should be private. Yes, accessing a property calls a method, but so does a Java getX().

Java uses the same rule, except getters and setters are implemented using setX(int) and getX(). C# properties are the equivalent. The client of a class should not care how the class stores values, but that the getters and setters work.


"However, C# uses the convention that capitalized "fields" are actually properties, and lowercase ones are true fields."

If only. In http://msdn.microsoft.com/en-us/library/vstudio/ms229043%28v..., Microsoft advocates:

"The PascalCasing convention, used for all identifiers except parameter names, capitalizes the first character of each word"


The UI in MonoDevelop / Visual Studio will show the differences during autocomplete. Also, fields should NEVER be public in a class.


I've written a lot of C# and Java (and others of course). It's really not an issue. If you're doing something expensive in a property getter or setter you're doing it wrong. If the function call doesn't get inlined and becomes a bottleneck in some tight loop you can just change it. Anecdotally, I have yet to see this occur in practice.

Also, as the guy below me pointed out, by convention you know that Foo is a property.


Exactly. It's (at least from what I've seen/read) common convention to make sure that getters/setters should be quick and have minimal side effects.

Your application shouldn't hang from a database call when you pull a property from an object. And obviously, methods doing such things should be documented appropriately.


Isn't not needing to know whether an object property is real or synthetic a feature?


Huh? Of course it is a feature. My point is that if something as innocent looking as property access can be an arbitrary method call, it may make understanding a piece of code more difficult. From the point of view of debugging existing code, which I've done a lot lately, hiding details that may matter in corner cases is not something that I want the language to encourage.


So you're against pretty much all encapsulation then?


Umm... Isn't that just an IDE feature and not a language thing? IntelliJ IDEA 12 has pretty amazing IntelliSense features. 90% of the time it knows exactly what i want to type from the first few Letters (even though this Enterprise Level Software has tons of similarly named classes/objects etc) Apparently it observes patterns to know which classes are used with which classes most often.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: