Hey all,
I have had a go at a bit of Java and C# and right now I wish to go further in one of them, I have had a quick look at [url=http://en.wikipedia.org/wiki/Comparison_of_Java_and_C_Sharp]this[/url] and noticed that Java has not got as many features as C#, but I also noted that Java has been around for a bit longer and has more available libraries such as LWJGL, and the main result I want out of learning programming is to be able to program games.
So I want your input and views on the issue, should I go with C# or Java? and which will benefit me in the long run?
Thanks,
TVC
Definitely C#.
You get:
- Lambdas
- Proper generics
- Type inference
- Anonymous delegates
- Operator overloads
- Extension methods (which leads to LINQ)
- Nullable types
- Unsafe code for when you need it
- Properties
- Events
- Indexers
[url=http://en.wikipedia.org/wiki/Comparison_of_Java_and_C_Sharp]More on Wikipedia[/url]
C#. For games you have XNA which is great for learning, as long as you aren't too bothered about skipping a lot of lower-level stuff (XNA can do a lot of things for you).
Definitely C#. I'm moderately good with both Java and C#, and I find C# to be tenfold more productive than Java. It's just a better language.
[QUOTE=TVC;22191163]more available libraries such as LWJGL[/quote]
C# has much higher quality libraries. LWJGL is utter shit; C# has Tao and OpenTK for that purpose. It also has SlimDX and XNA for the DirectX side.
[quote]So I want your input and views on the issue, should I go with C# or Java?[/quote]
C#.
[quote]and which will benefit me in the long run?[/QUOTE]
Both. But for now, just stay with C#.
You can definitely do game development in Java, it's much easier in C# though.
[QUOTE=andersonmat;22191670]it's much easier in C# though.[/QUOTE]
Nope, it's not
[QUOTE=Ericsson;22191687]Nope, it's not[/QUOTE]
You have to jump through so many hoops to have OpenGL in Java it's not funny. It's much easier to get everything working in C#. Plus, C# will be much faster than Java for a game [engine].
It doesn't matter what language you pick. They both are so equal you can practically copy Java code and put it in a C# project and vice versa without having to change more then some details.
Java uses a little different syntax and function declaration then C# but other then that they are equal.
For games though, C# has XNA which I really recommend you go with if you haven't worked with any type of graphical programming before.
knock knock
who's there
[long pause]
Java.
Not funny. Java isn't that slow anymore.
C# is still faster bro.
[editline]10:19PM[/editline]
C# is all liek knock knock C# who's there?
Good, because Java is byte code that's run in the JVM. It's obviously going to be faster than an executable that's compiled.
C# is only compiled to CIL, which is bytecode.
However on execution it gets JITed to native :>
Hmmph, I'm studying basic Java at school for the moment and I will so until next year, it's a part of the basic course. Then I can choose C++. If I learn that, can I use C# as well?
[QUOTE=CommanderPT;22192883]Hmmph, I'm studying basic Java at school for the moment and I will so until next year, it's a part of the basic course. Then I can choose C++. If I learn that, can I use C# as well?[/QUOTE]
If you learn C++ you'll code C# with ease after short practice.
Java is what made me completely uninterested in the subject, have no idea why but I just don't click with java at all. Probably me being an ignorant retard but I always associate java with godawful slow bug ridden programs made by computer science students, mobile apps and runescape.
[QUOTE=iNova;22193106]If you learn C++ you'll code C# with ease after short practice.[/QUOTE]
Alright, thanks. People keep talking about XNA, shame the PS3 doesn't have anything similar, (as far as I know it's very hard to work with) XNA is the only thing that can make me buy a 360 again. But, by the time I become good at programming the Xbox 1080 will be already out.
[QUOTE=andersonmat;22191921]Good, because Java is byte code that's run in the JVM. It's obviously going to be faster than an executable that's compiled.[/QUOTE]
C# is compiled into bytecode, like Java.
Java is great for learning programming, but C# is better for learning game programming.
[QUOTE=Fear_Fox;22191853]It doesn't matter what language you pick. They both are so equal you can practically copy Java code and put it in a C# project and vice versa without having to change more then some details.
Java uses a little different syntax and function declaration then C# but other then that they are equal.[/QUOTE]
:downs: :bang:
[QUOTE=DogGunn;22195602]C# is compiled into bytecode, like Java.[/QUOTE]
However, it is turned to native later:
[QUOTE=turb_;22191940]C# is only compiled to CIL, which is bytecode.
However on execution it gets JITed to native :>[/QUOTE]
[QUOTE=CommanderPT;22195219]Alright, thanks. People keep talking about XNA, shame the PS3 doesn't have anything similar, (as far as I know it's very hard to work with) XNA is the only thing that can make me buy a 360 again. But, by the time I become good at programming the Xbox 1080 will be already out.[/QUOTE]
C# isn't that hard and you don't really have to necessarily develop for console :P
XNA is really easy to use imo.
Most JVMs also do JIT compilation, I'd say that the speeds are probably pretty much the same now. You can also compile Java straight to machine code with GCJ.
Really what language you should use is the one that you like, and are most comfortable with.
[editline]05:34PM[/editline]
Using GCJ you can also call Java code and classes from C++, read up on it a bit.
That sounds like fun. Compiled Java. :haw:
If you really wanted to be professional about it, you could always use C++ with embedded ASM. It'd be a motherfucker to write but it would be awesomely fast.
[QUOTE=andersonmat;22206154]If you really wanted to be professional about it, you could always use C++ with embedded ASM. It'd be a motherfucker to write but it would be awesomely fast.[/QUOTE]
There's nothing fast or professional about C++ with embedded ASM.
Then how the fuck do you expect to use SSE instructions when visual studio has fucked up intrinsics?
[QUOTE=andersonmat;22199864]However, it is turned to native later:[/QUOTE]
Of course the code is then translated into native code, how else could the machine understand it then? Java has the process run through the JVM and C# the CIL.
By the time you outpace Java's speed capabilities with the programs that you're developing, you'll have a good enough grasp on programming to switch over to C# without too much of a problem.
I would recommend learning Java as it's a great learning language.
[QUOTE=andersonmat;22206377]Then how the fuck do you expect to use SSE instructions when visual studio has fucked up intrinsics?[/QUOTE]
Using C++ with ASM is really only the kind of thing you'd use when writing something that is even hand optimizable. Usually a compiler will do most optimizations for you, better than an inexperienced ASM coder could hope to do by hand. Maybe if you were writing an emulator or something like that you might use it.
Technically that's correct, but how does one become experienced without practice?
Sorry, you need to Log In to post a reply to this thread.