Slashdot Mirror


C# From a Java Developer's Perspective

Microsoft's C# has raised eyebrows, interest and debate since its official announcement last year. The prolific Carnage4Life (Dare Obasanjo) has completed a detailed comparison of C# and Java, outlining the things that are identical, similar, nearly the same, or completely different between the two languages. If you're considering learning or applying either one, you might benefit by reading this paper first. There are some other excellent comparisons to be found linked from the Open Directory Project as well. Update: 11/20 03:35 GMT by T : Note: here's a mirror; interested readers who mirror the mirror get good seats in heaven.

5 of 507 comments (clear)

  1. Re:C# is really kinda cool stuff by kelzer · · Score: 0, Flamebait

    Score 5 - Insightful?

    Please cancel my subscription to Slashdot.

    --

    ---------------------------------------------
    SERENITY NOW!!!!!!!!!!!!!!!!
  2. I resemble that comment! by Erris · · Score: 0, Flamebait
    You should do what's best for the client.

    How can anyone say that IIS is good for a client? Constantly rebuilding virus infested desktops is good for no one. While you have to give the poor devil what they ask for, you might try a few predictions so that when things go south you can come in and fix thing right. Good luck.

    Security sure is a bitch when you don't have real user accounts.

    --
    DMCA, Hollings, Palladium. What might have sounded like paranoia is now common sense.
  3. Re:The lesser of two evils by nebby · · Score: 3, Flamebait

    That was perhaps the best troll I've ever seen posted on Slashdot. The only reason it didn't fool me is because I've been developing C# for the past month and before that was doing Java for 3 years or so. C# is better, hands down, as long as you don't want cross-platform compatibility.

    --
    --
  4. Functionality of Windows? by Merk · · Score: 3, Flamebait

    Stupid slashdot lameness filter. Shouldn't a geek site support a means of posting source code??

    Gee, you mean like being able to generate an app that causes a BSOD using a java-like syntax?

    All kidding aside, there are some cool ideas in the language. Support for enumeration is one. Currently most enum-type things in Java are done with integers, and so you have to do bounds checking whenever you get a value. The foreach operator is another nice one. It's a minor change, but it makes certain loops much quicker to write and much more readable. I also like operator overloading. It has never seemed right that in Java "+" concatenates strings, which are objects, but they're the only special object in the system. I admit that in C++ doing operator overloading properly can be hard, but it's a really convenient OO feature.

    The C# way of multiple interface implementation seems like it could be good, but will mostly just cause programmer errors.

    public interface ITeller
    {
    void Next ();
    }

    public interface IIterator
    {
    void Next ();
    }

    public class Clark : ITeller, IIterator
    {
    void ITeller.Next () {
    }
    void IIterator.Next () {
    }
    }

    To me that just looks like a bug waiting to happen. Under occasional circumstances it means you can do something you couldn't otherwise do, but this just looks dangerous to me.

    Mostly though I look at C# and say to myself: "Shouldn't a language that was designed years after Java be better than Java?". Java got rid of the preprocessor. This is a good thing, C# brings it back. That's a bad thing. (I know, conditional compilation is nice, but don't do it with a preprocessor, ick!) And what about reflection and dynamic class loading? Those are some sweet features, especially in a networked language, but in C# they're missing/gutted.

    And then there's just wierd-ass syntax pollution:

    [AuthorAttribute ("Ben Albahari")]
    class A
    {
    [Localizable(true)]
    public String Text {
    get {return text;
    }
    ...
    }
    }

    I can accept the strange getter/setter method, though I think it's dumb. It's just vb-like, with a strange and confusing mix of methods, functions and subroutines. But what's with that array-like crap? Btw, that's also how synchronized methods are declared.

    I wonder if Sun would ever agree to put some of the nice features into Java, or if the language is essentially frozen, and they're going to work on the APIs.

    Btw, the MSXML parser? It's certainly MS, and certainly not XML.

  5. History by anotherbadassmf · · Score: 0, Flamebait

    Microsoft has a history of taking a nice, simple technology and fucking it up by making it inelegant and incompatable.

    C# is no exception.

    I am starting to think that perhaps the purpose is not to be incompatible to lock ppl into Windows, rather that they have some strange breed of ppl who know no better than to make some real ugly shit. One rotten apple spoils the barrel, I guess.

    Kinda feel sorry for them ...