in reply to Perl and C# - how I use both

But isn't C# just Micro$oft's attempt at reinventing Java? Why not just use Java? At least it's cross-platform.

Replies are listed 'Best First'.
Re^2: Perl and C# - how I use both
by jdrago_999 (Hermit) on Mar 10, 2009 at 17:17 UTC
    Why not just use Java?
    ...because I don't want my application to suck up 2Gb RAM just to sit there and do nothing?
      Is C# really better in this respect?
        Is C# really better in this respect?

        Yes

        C# can be blazingly fast and the garbage-collector functions in a well-documented, predictable manner. Coming from Perl it worked (almost) as I would expect it to. When an object goes out of scope or has no more dangling references, it is elligible for garbage-collection.

        No

        This is WINDOWS we're talking about. If it were a car you purchased from Microsoft, it would come without locks on the doors, and the nice Michelin tires would only be yours for the first 60 days. Locks would cost extra and cause your car to be incapable of driving faster than 45 miles per hour. The same company that produces the locks would also be paying car thieves to break into cars while you're not looking.

        Memory management is just not something I could consider Windows to be particularly good at. However, from my experience running BEA WebLogic (Java) instances on Windows and running fairly complex ASP.Net applications on Windows, I can say with confidence that the Java apps took about 5x more RAM and CPU than the .Net ones, and were more difficult to deploy, update, code and debug. The ASP.Net ones were fairly easy to manage and code, and ran much faster than the Java apps.

        The ASP.Net apps became extremely slow when the ViewState contained too much stuff. Using ASP.Net MVC instead of the bizarre "event-based" ASP.Net (the default thing where you assign actions to the buttons that users click, etc) sped things up considerably.

        .Net is definitely not my favorite thing in the world, but given the choice between doing the job in .Net and not doing it at all, I will choose .Net every time.