[.net] Sharp the C, or coffee

Started by
11 comments, last by Tape_Worm 16 years, 6 months ago
Hello I'm new to .NET and some of my IT mates advised me to start learning the C# and get rid of the low level things I have been into since very long. My question is, what makes C# worths learning instead of say Java? Both offer a huge bunch of services...both are dynamic...both are VM...both share the same language features... Except for one thing that C# is not portable. Mono is still under development and not supported by MS. Java gui sucks. And both languages suck for speed. Huh?
Advertisement
Quote:Original post by HugosHoH
And both languages suck for speed.


Hasn't been true with Java for about 3 years. JIT compiling makes Java apps extremely competitive with native apps. IIRC C# is similarly good speed-wise.

-me

Quote:Original post by HugosHoH
My question is, what makes C# worths learning instead of say Java? Both offer a huge bunch of services...both are dynamic...both are VM...both share the same language features...

Comparison of C Sharp and Java

Quote:Original post by HugosHoH
Except for one thing that C# is not portable. Mono is still under development and not supported by MS.

Your first statement is just wrong. Your second statement is just a bad argument, Microsoft owns the "C#" just as little as they "own" C++. Mono is not complete, this is true, but it has come a very long way and many would probably say that it's stable enough to rely on.

Quote:Original post by HugosHoH
Java gui sucks.

Ok... ? And your arguments for this are?

Quote:Original post by HugosHoH
And both languages suck for speed.

Really? Where did those statistics come from?

Best regards, Omid
Omid, you just quoted my words and commented on them by repeating the same statements in a different way...well my question again, what makes C# worth learning, or what makes companies rush on it like mad? what makes it favourable over java if it's?
Quote:Original post by HugosHoH
Java gui sucks.

And both languages suck for speed.


Pretty bold statements for never having used either of the two.

Java and C# are rather similiar syntactically. Really, the decision on which to use should probably be based on the type of application you plan on building and what you plan on doing with it - and of course, your preference. Google will produce a nice comparison of the two. If you're already a good programmer it shouldn't take much investment to learn one, the other, or both.

Java GUI doesn't necessarily "suck." The default look and feel might be ugly, but that can easily be worked around. Swing serves its purpose. I've written large GUI's with swing and a few excellent third party tools and they've come out as good as a GUI written anywhere else. Swing is far from perfect - but I wouldn't generalize it as "sucking."

Saying both languages suck for speed is a mis statement, I think. Alot of people who don't have much experience with the two say this. Using the .NET libraries and good coding practices, C# is plenty fast. Just look at some of the graphics and game engines that people have written in C#/.NET. Are they bleeding edge? No, of course not - but some of them really are excellent. What are you doing that requires such intense speed? C# doesn't "suck" for speed, and if it isn't fast enough for whatever computationally intensive algorithms you're implementing, use C++, dont bother with Java or C#.
[size="1"]"For any absurd set of thinking, you can probably find a non-zero percentage of the population who is utterly convinced of its truth."
Quote:Original post by HugosHoH
Hello

I'm new to .NET and some of my IT mates advised me to start learning the C# and get rid of the low level things I have been into since very long.

My question is, what makes C# worths learning instead of say Java? Both offer a huge bunch of services...both are dynamic...both are VM...both share the same language features...

Except for one thing that C# is not portable. Mono is still under development and not supported by MS.

Java gui sucks.

And both languages suck for speed.

Huh?


You make quite a few statements for someone that inexperienced. An attitude mostly disliked by peers, esp. if these peers know a good deal about the subject.

First of all, Java does run inside a VM, .NET does not. Any .NET code being executed is being executed ON the CPU. Sure, every .NET language compiles into MSIL, but once the MSIL code reaches the point of being executed, it will get compiled, stored and then executed on the CPU. In comparison, C# is capable of attaining around 95% of the speed C++ can do, and is generally faster in memory allocation(Unless you're using custom made allocators).

What makes Java / C# excellent for application development is that they support a widerange of features, such as garbage collection, reflection, hooking of OS specific libraries(Shared Objects / DLLs / etc.).

What makes C# more used by companies than Java(Or rushed), is the fact that it integrates perfectly with Windows, all GUI widgets are in the standard windows look(No extra libraries / coding needed), a better event model than Java offers and the .NET distro's can be grabbed off the Windows Update site.

C# also comes with one of the best IDEs out there: Visual Studio. Also do languages like Java / .NET speed up development rapidly. Instead of me writing low-level code to(For instance:) make sure all my memory is properly cleaned up, C# does it for me, and I can focus on writing what I do need to write: An application that does what my client wants(My client also wants the app to not have memory leaks, but he doesn't like it when you schedule a complete week to make sure it's all safe).

Also, C# offers what Visual Basic couldn't: A Rapid Application Development(RAD) environment that allows you to write code that doesn't end up in a huge spaghetti of horrific code with good exception handling and also suitable for writing applications that run as webservice, website or even on a PDA.

Toolmaker

[Edited by - Toolmaker on October 9, 2007 1:39:27 PM]

Quote:Original post by HugosHoH
Omid, you just quoted my words and commented on them by repeating the same statements in a different way...

No, I quoted your words and said that they were plain wrong. The only statement I agreed with was that "Mono is under development".

Quote:Original post by HugosHoH
well my question again, what makes C# worth learning, or what makes companies rush on it like mad? what makes it favourable over java if it's?


C# is a good language, as in designed in a way which many programmers find pleasing, has features which most programmers agree are great features for a general purpose programming language, can be used for web application development as well as for client applications, and is very powerful and fast (yes, fast) whilst allowing relatively short development times, just to name a few reasons.
As for a comparison to Java, I already gave you a good link.
Best regards, Omid
Personally, the reasons I like C# over Java are the fact that C# supports properties, delegates, events, operator overloading. C# also gives the programmer the ability to define stack allocated types, as well as the ability to write type unsafe code using pointers.
One thing to keep in mind that C# is better able to address the faults and issues concerning Java because it came out relatively recently. So where you may have issues with the Java language and its design, you will probably not find them in C# as the designers set out to fix the flaws they saw in the other languages around them, including C++ and Java.
Mike Popoloski | Journal | SlimDX
Quote:Original post by Toolmaker

In comparison, C# is capable of attaining around 95% of the speed C++ can do, and is generally faster in memory allocation(Unless you're using custom made allocators).

Toolmaker


I have a question concerning that. Does this mean that a C# beginner vs a C++ beginner the C# program would maybe even run faster? Considering that even a novice C++ programmer may not even be able to optimize the speed of C++?

Thanks

This topic is closed to new replies.

Advertisement