Slashdot Mirror


Learning Java or C# as a Next Language?

AlexDV asks: "I'm currently a second-term, CIS major at DeVry University. This coming term, I will have the choice of studying either Java or C# for my Object Oriented Programming class. Now I'm a diehard Linux user, so I'm slightly conflicted here. Which should I take?" "I know C#.NET is primarily a Microsoft language, but, with Mono gaining momentum, it could very well become a major development platform for Linux as well. Novell has really been pushing it lately, and there seems to be a lot of very cool Linux apps being developed with it.

Java, on the other hand, is inherently more Linux-friendly due to its intentional cross-platform nature, but at the same time it doesn't really seem to be inspiring the same kind of developer enthusiasm as Mono. However, it's clearly not an insignificant OSS development language, with the recent news that Java has surpassed C++ as the #1 language for SourceForge projects.

Anyway, I though I'd toss that out there and get some opinions from other Slashdot readers. Any thoughts, advice, and/or rants are appreciated :)"

3 of 817 comments (clear)

  1. Re:Just Pick One and Learn it Well by theGeekDude · · Score: 5, Informative

    Well if you choose Java, then you can use free Eclipse IDE which is excellent. Otherwise if you choose c#, the ony decent ide is visual studio which will cost you a fortune.

    --
    Dont waste you time reading stupid sigs like this.
  2. Visual Studio is Free! by MBCook · · Score: 5, Informative

    It doesn't matter. As a DeVry student he gets a free software bundle that includes:

    Windows 2000 (or was it 2k3?)
    Windows XP Pro
    Microsoft Office Pro
    Microsoft Visio
    Microsoft Visual Studio .NET
    and something else.

    Price is not an issue in this.

    --
    Comment forecast: Bits of genius surrounded by a sea of mediocrity.
  3. Re:Just Pick One and Learn it Well by Trepalium · · Score: 5, Informative
    Yes, you were just lazy. They're called assemblies in C#, and you can dynamically load them via the System.Reflection.Assembly.Load() method. It'd be pretty silly to be missing something like dlopen or LoadLibrary in C#, wouldn't it? You typically have to combine that with an application domain so you can unload the assemblies.

    .Net's reflection capabilities are quite a bit more extensive than Java's (there is native support for outputting byte-code and even entire classes at run time). If you want to pick on C#/.Net, pick on it's limited exception handling (unchecked exception handling only makes 'black box' use of objects more difficult), or simply the fact that C#'s feature set is obviously derived from Java.

    As for features that C# offers that Java doesn't... Wikipedia has a list and links to other sites with more. Whether or not you find these features useful or painful is a matter of taste, though. Many of the features of C# were created to make Visual Basic-style GUI creation easy and painless. C# offers operator overloading, true multidimensional arrays, delegates and unsigned types. Unless you have the pleasure of running in an entirely Java/managed environment, those unsigned types are a life saver (or at least a sanity saver). Delegates (multicast function pointers) make wiring up event-based GUIs a little easier. True multidimensional arrays are either invaluable or useless, depending on the kind of software you write. Operator overloading can also be useful, provided it's used carefully (and can cause no end of confusion if it's not).

    --
    I used up all my sick days, so I'm calling in dead.