|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic Page: 1 2 3 4 5 »» |
Last Thread Next Thread ![]() |
| C# Vs Java (Please no flaming) |
|
![]() Dark Star Member since: 1/20/2000 From: NW London, United Kingdom |
||||
|
|
||||
| Hi guys, just waondering wat language people prefer here out of C# and Java and why? Is C# and its .NET framework necessity almost like or identical to Java and its JVM necessity? Is Java sooo still widely used or will C# dominate it? Im just interested in this topic and those questions do not form any part of my opinion just idles thoughts Ive seen from some people. I personally prefer C#, I dont know why, but Im relatively new to C#. Thanks DarkStar UK --------------------------------------------- You Only Live Once - Don't be afriad to take chances. |
||||
|
||||
![]() ernow Member since: 3/9/2001 |
||||
|
|
||||
| Is C# and its .NET framework necessity almost like or identical to Java and its JVM necessity? Yes. Is Java sooo still widely used or will C# dominate it? This is asking for flames... Gardner expects both to grab 50% of the new software projects... At the moment this is true in my experience. Chances are that most large companies will (have to) embrace both. The choise between .NET and J2EE is primarily a choise between software vendors (MS <-> the rest) MS: single vendor -> can be very inovative MS: single vendor -> enormous lock-in the rest: multiple vendors -> shop for the best/fitting solution the rest: multiple vendors -> competing again themselves is crippling standards and progress Just my 2c Cheers |
||||
|
||||
![]() ernow Member since: 3/9/2001 |
||||
|
|
||||
| BTW: when you ask "just waondering wat language people prefer here out of C# and Java" my answer is C# but that because the language is newer and I like Visual Studio. Comparing .NET to J2EE is something completely different but far more important than the language. Cheers |
||||
|
||||
![]() Saruman GDNet+ Member since: 2/16/2000 From: Toronto, Canada |
||||
|
|
||||
| C# is the 'finished' version of C++ for applications :) |
||||
|
||||
![]() Pxtl Member since: 5/28/2004 From: Canada |
||||
|
|
||||
Quote: No, its VB with C syntax. Or, its twisted Java. Either way, its C++ for people who dont want to have to deal with the nitty-gritty. And the generics are still a joke (compared to C++ templates) so it isn't done yet. Alternately, Java is called C++--, so C# is C++-=1. In other words, saying the same thing slightly differently. |
||||
|
||||
![]() Talonius Member since: 3/27/2003 From: Saint Charles, MO, United States |
||||
|
|
||||
| [Everything below is my opinion. Nothing should be construed as fact. This is how I see things. Doesn't make my viewpoint correct. :)] I can produce code in both Java and C#. C# is native to Windows and for a company producing corporate, in house, Windows based applications, is a no brainer. Java works well, is very similar to C#. It isn't standardized (C# the language is a standard, at least) and is supported by Sun, who don't have a clear plan for the future for it, as far as I can see. Java is also hindered by the erratic numbering. What's 1.4 vs 1.5? JDK 5? What? J2EE 2? What the hell is that? Java is much more supported in the open source arena. There's a ton of free applications for it (Eclipse, anyone?) and a ton of developer support and knowledge free for the taking. The only difference between the two to me is who backs it and the library supporting it. The .NET BCL is fairly comprehensive and organized; I haven't worked with Java enough on large projects to comment. .NET got lost in the Microsoft marketing mechanism and confused a lot of people. [References to Visual Basic are for Visual Basic 6, not VB.NET.] As far as C# vs. VB -- I find few similarities between them. There are some shared iterators, and C# is aimed at "ease of use", but that doesn't mean it's a bad language. If I can sit down and write code that can be read aloud and understand -- then I think that code is clear and easy to follow, debug, and write. Visual Basic was aimed at hiding all of the mechanisms from the programmer - abstracting away the complexity. C# doesn't do this -- I'd love to see the Reflection or Remoting namespace implemented in Visual Basic. C++ code also doesn't fit that bill very often. C++ is like building a kit car -- yea, it's awesome, it's fun, it's got a LOT of power and flexibility -- but C++ isn't very handy when you just got handed an application that has to be done in two days and you're at ground zero. I can develop in C#. I can code in C++. The difference is subtle, but important. How'd I stray off into C++? *sigh* |
||||
|
||||
![]() Arild Fines Member since: 8/20/2001 From: Oslo, Norway |
||||
|
|
||||
There was a thread on the mono list the last days where the question came up about why Ximian chose to go with .NET instead of building on Java. These are some of the points(edited for clarity):Quote: -- AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system. [Project site] [IRC channel] [Blog] |
||||
|
||||
![]() Arild Fines Member since: 8/20/2001 From: Oslo, Norway |
||||
|
|
||||
Quote: He said no flames. Quote: C# generics do not aspire towards being C++ templates, a mechanism widely regarded as horribly broken. |
||||
|
||||
![]() Saruman GDNet+ Member since: 2/16/2000 From: Toronto, Canada |
||||
|
|
||||
Quote: There is a reason I stated that. List of components I am building for my base engine (it is being developed in unmanaged C++): - Garbage Collection and memory management - Events and delegates - Properties and property lists and the list could go on.. but no need to. These are for core system processes and are vitally important to an engine.. a hell of a lot more important than a graphics lib, input, etc. Why do you think these types of things were implemented in the C# language? Gee I wonder.. probably because they are some of the more needed patterns used by application programmers. The only reason I am still using unmanaged C++ instead of C# is for math really. And trying to compare generics to the C++ broken template system? There isn't an experienced C++ developer that can say the template system was a good design choice. |
||||
|
||||
![]() Washu Curiously Tentacled Community Manager Member since: 3/24/2001 From: Kanemitsu |
||||
|
|
||||
| Hey now, try and keep it civilized... |
||||
|
||||
![]() TheBluMage Member since: 7/24/2004 |
||||
|
|
||||
| In my opinion: Both are great languages. Part of what makes them great is that they both have huge, well-documented, object-oriented, easy-to-use standard libraries. Java was my first programming language and I love it. C# is probably my favorite - if forced to choose between the two, because of some of the features it has that Java doesn't (user-defined value types, properties, events/delegates, operator overloading and the choice to make methods non-virtual, to name a few). I think C# probably has a bigger future ahead of it than Java does, not because of ease of use or performance, but because C# is backed by Microsoft (which, let's face it, is a very large, flourishing, influential corporation). Don't get me wrong - I think Java has every right to be widely used that C# does, I just don't think Sun has the resources at its disposal to stay afloat against Microsoft's extemely well-funded .NET project. But, even if the Java platform isn't here to stay, the Java language itself probably will stick around in the form of J# (though, not too many people are using it yet). Java does have a lot of popularity going for it though, so who knows what could happen? Again, it's just my opinion and I don't want anyone to take it as an insult if their opinion differs. |
||||
|
||||
![]() HopeDagger Member since: 6/26/2004 From: Waterloo, Canada |
||||
|
|
||||
| While I was still new to the programming world, I saw Java as a very nice, easy to use language with great API structures and 'OOPness'. It's crossplatform and has tons of resources, and plenty of followers. Then I came across C# and .NET. I've got to tell you: after using C# for a while, Java's structural/design flaws and oddities stick out a lot more. I can't program seriously in Java anymore because after every function I write I think about how much elegant and better organized it would be in C#. And I find the .NET classes a lot easier to navigate and use than the Java classes. I think C# definitely has the advantage though, since it got the gift of hindsight, building from Java's mistakes. The only downside is redistributing C# (or any .NET app) is a royal pain because people are too lazy to download the .NET framework. :/ That's my opinion. Java is great, but C# has spoiled me rotten. ;) |
||||
|
||||
![]() Arild Fines Member since: 8/20/2001 From: Oslo, Norway |
||||
|
|
||||
Quote: I keep seeing people saying this, but is it really true? I mean, we now have actual, commercial, shrinkwrapped games written in C#. Two(or possibly even more?) of the major RSS aggregators are written in C#. The Gmail thingie is written in .NET. More and more people are using broadband, and even if they're not, it doesn't take more than a couple of hours to download 24 megs. I think this sentiment is becoming more and more of a myth. If Jo E Average wants to download your app, and you tell him that in order to get it to run, he needs to go here and download this thing, he'll most likely just go "Oh, ok then." -- AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system. [Project site] [IRC channel] [Blog] |
||||
|
||||
![]() weevilgenius Member since: 11/1/2004 From: Portland, USA |
||||
|
|
||||
| One distinction that hasn't been mentioned here is that Java is a single language that is platform agnostic whereas .NET is a single platform that is language agnostic. The differences to a potential game developer can be difficult to asses. Java: "My game can run anywhere!" .NET: "I can develop my game in (almost) any language!" This is changing somewhat with projects like mono allowing the .NET platform to run under Linux and OS X. |
||||
|
||||
![]() Saruman GDNet+ Member since: 2/16/2000 From: Toronto, Canada |
||||
|
|
||||
Quote: I completely agree with Arild, I mean when I was distributing my demos and small applications written in C# I didn't once get a complaint or here of someone that couldn't run it. |
||||
|
||||
![]() JohnBolton Member since: 4/3/2002 From: Belmont, CA, United States |
||||
|
|
||||
| One of the things I like about C# is the drag-and-drop UI building and code generation. For my UI-intensive applications and tools, that is really convenient. Is there something similar for Java? |
||||
|
||||
![]() Talonius Member since: 3/27/2003 From: Saint Charles, MO, United States |
||||
|
|
||||
| John, You'd probably find more if you looked for a specific windowing toolkit. For instance, Swing has several graphical editors available for it. 1 2 3 4 There's a ton more available but it does take some poking around. The primary problem is that with .NET you receive a cohesive editor, designed from the ground up to do everything that it does. With many of the Java products you'll find they're slanted towards one type of activity or another - i.e. graphically designing a form but requiring you to hook events to the forms controls separately, etc. (JBuilder is a really fun tool to use though. And Sun's newest IDE is extremely nice.) As for the .NET runtime -- it is included with each new Microsoft operating system (primary complaint I had with Windows Server 2003 was that it only included .NET 1.1 - it didn't include .NET 1.0 as well). The CD versions of Windows XP Service Packs also have the framework on them, although it is not installed by default. Still, ~20Mb is next to nothing and like it or not, the Microsoft juggernaut is pushing this software out to more and more machines. If, as an end user, I'm told I have to download a ~20Mb file and in return I get updates faster, more reliable code, and code that I can control -- I'm all for it. (By control I mean what happens when you try to run default code from a network share. The security policies in effect are great to have, especially on sandbox systems.) |
||||
|
||||
![]() Nytegard GDNet+ Member since: 2/17/2000 |
||||
|
|
||||
| Either way, be it Java, or C#, the user may have to download the runtime. The machines at my work come with neither the java nor .net environment, so I see that as really a moot point. I'm really new to C# & the whole .NET approach right now (first time with it on a new project), so some of what I may say probably is wrong. Honestly, from a coding standpoint (and coming from a C & C++ background), I prefer coding in C# more. As others have stated, it has java to look back on and see its mistakes. From a GUI standpoint, I prefer java. The Swing library for it is just far more advanced than what C# has to offer. You can match the ability of it, but either you end up having to write code yourself (why reinvent the wheel), spend money on components (dotnetmagic and its ilk are expensive), or try to find the one page with source code in a sea of webpages. Many of the Java IDE's state how the whole IDE was actually written in Java. You can reproduce everything in the GUI fairly easily. Looking at Visual Studio, and immediately you can tell it doesn't come with half the graphical controls that it uses (which is ashame, because I really like the VS IDE). The problem I have with Java (although this argument gets misused and too many people I see claim it with C# instead), is that it is controlled by Sun. Sure, MS created C#, but it's standardized. Sun could do to Java what MS did to VB6 when it went to VB.NET. On a whim, the next version changes the whole language structure. Not saying they will, just that they have the ability. At the same time, a reason I like (and despise) C# is the ability to do things Java doesn't allow really. If you want to, you can use unsafe code and get access to pointers. You can also call the native Win32 functions pretty easily. At the same time, this gets frustrating for me, because in my quest at work to create a very portable program (GUI in C# and backend in ANSI C++), I end up finding that I have to handle portions of the code using imported Win32 functions and messages, because .NET just does not have any native support for them. |
||||
|
||||
![]() Talonius Member since: 3/27/2003 From: Saint Charles, MO, United States |
||||
|
|
||||
| Nytegard, Just a note about DotNetMagic: Crownwood used to offer the library as a free library. It can still be downloaded from http://windowsforms.net/default.aspx?tabindex=6&tabid=47&ItemID=9&mid=142. Their pricing for their new products isn't bad (compared to some of the crap out there, their product is excellent and cheap). The free controls come with source so you can build on them and toy with them. There's some excellent free controls available at http://www.divil.co.uk/net/controls/ as well. Some of his require registration as well, but again, they're well worth the price. The "find code in a sea of webpages" is true. I'm tired of slogging through crap to find out the best way to do something. Thank God for sites like CodeProject, WindowForms.net, and GotDotNet. O'Reilly's site OnDotNet is nice too. |
||||
|
||||
![]() afterburn Member since: 5/30/2000 From: USA |
||||
|
|
||||
Quote: It already runs on OSX, FreeBSD, 98,ME,2000,XP,2003 on the MS .net framework. Its also shared source on the OSX and FreeBSD. |
||||
|
||||
![]() Pxtl Member since: 5/28/2004 From: Canada |
||||
|
|
||||
| Okay, I'll say it: C++ templates are better than sex. Yes, they've got some faults (ugly syntax, poor debugging) but generally I find them the most powerful way to do generic programming in a statically typed language. Yes, they're realy just glorified macros, and yes, the Java approach of typesafe interface-oriented generic parameters would be more intelligent, but all in all I love them. I spent a long time with python, which is very, very dynamically typed. Coming back to Java I felt castrated without my meta-programming toolkit. C++ templates were, by comparison, a breath of fresh air. Now Java has its generics, which are good, but templates are just older and have been explored more completely - their bizzare possibilites are better understood. |
||||
|
||||
![]() CpMan Member since: 1/4/2001 From: Gainesville, USA |
||||
|
|
||||
Quote: I think that Java had this advantage originally because Sun supported other platforms in their vm's. Microsoft is unlikely to release a runtime for linux, though I've heard that there is a team working on porting .NET to unix, but since it's standardized, it's already reaching other platforms anyway. Honestly, I agree with most people here that Java's flaws stick out. The fact that basic types aren't objects can make truely generic containers a pain, and is my number one annoyance with Java. The second one is that Java's GUI systems don't really like to "look" like the OS they're running under (without a good amount of work at least). One of the awesome things about windows is how consistent applications behave and look. VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible. |
||||
|
||||
![]() Scarfy Member since: 4/25/2002 From: United Kingdom |
||||
|
|
||||
Quote: You really really must get laid more. |
||||
|
||||
![]() nuvem Member since: 1/17/2004 From: Ottawa, Canada |
||||
|
|
||||
Quote: Quote: Horribly broken? Not a single experienced developer? Have you ever heard of boost? Granted, they're not the prettiest things in the world, but "horribly broken"? Actually, nevermind, I'd rather not waste my time. |
||||
|
||||
![]() seanw Member since: 10/12/2002 |
||||
|
|
||||
| If you're picking a platform to develop on, you really should be comparing Java against .NET and not against C#. The big plus of .NET is how all the different languages (e.g. VB.NET, P#) get compiled to a common intermediate language. If you use the Java platform, you're really talking about just using Java. Yes, there are projects that convert some different language (e.g. Lisp, Prolog) into Java bytecode, but Java was never designed with this in mind and it does come across as a hack that's unlikely to be deployed on a large scale.
You can say you don't like C#, but you don't have to use C# to use .NET. You could use managed C++ for example. The major issue I have with .NET is that it isn't cross-platform and MS aren't actively helping to make it cross-platform. MS have a very shady stance with Mono and dotGNU and their business history does not fill me with confidence that they won't try to crush them with things like patent lawsuits once those projects reach maturity. I do like the idea of .NET, but nobody who uses non-Windows operating systems feels comfortable with MS being behind it. |
||||
|
||||
|
Page: 1 2 3 4 5 »» All times are ET (US) ![]() |
Last Thread Next Thread ![]() |
|