C# or C++

Show off new creations, get help, or just chat about all aspects of web development and design.

Re: C# or C++

Postby davidc538 on Tue Jul 14, 2009 8:16 pm

take it from someone with tons of programming experience. it doesnt matter which you learn, youll cross from one to the other pretty quickly
User avatar
davidc538
Been Here A While
Been Here A While
 
Joined: Mon Aug 11, 2008 4:27 pm

Re: C# or C++

Postby krainert on Wed Jul 15, 2009 3:06 pm

Spike wrote:C# is slooooooooooooooooooowwwwwwww for a videogame.

Frankly, I believe that is just a rumor. C# is executed almost as fast as C++ (like 5 % slower in average for hardcore mathematical functions if I remember correctly) so it's really more about what the language allows you to do. C++ works on a lower level than C# and is therefore better in terms of creating large projects with a great level of more or less direct interaction with hardware to create advanced graphics etc. C#, on the other hand, is more intuitively structured and allows for better control of simpler tasts; any program not supposed to do something new on a low level is best written in C#. Any program intended to operate low level is best written in C++. Of course, there are exceptions, personal preferences, and subjective factors, but that is the basic difference in usage.
User avatar
krainert
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Thu Dec 20, 2007 2:57 pm
Location: Denmark

Re: C# or C++

Postby zombie@computer on Wed Jul 15, 2009 3:26 pm

OVRKLL wrote:
Spike wrote:C# is slooooooooooooooooooowwwwwwww for a videogame.

Frankly, I believe that is just a rumor. C# is executed almost as fast as C++ (like 5 % slower in average for hardcore mathematical functions if I remember correctly) so it's really more about what the language allows you to do. C++ works on a lower level than C# and is therefore better in terms of creating large projects with a great level of more or less direct interaction with hardware to create advanced graphics etc. C#, on the other hand, is more intuitively structured and allows for better control of simpler tasts; any program not supposed to do something new on a low level is best written in C#. Any program intended to operate low level is best written in C++. Of course, there are exceptions, personal preferences, and subjective factors, but that is the basic difference in usage.

Nah, it depends on what you do with it. Certain parts of c#, just like most 3rd level languages, are optimised for common procedures, like loops. A foreach loop in c# is a lot faster than a for(x=0;x<100;x++) loop, for instance. If your code relies on lots of these kind of loops, you wont notice much differences in speed. Games usually rely on complicated code without much of these prefabbed bits of code, hence, slowness. I dont think c#'s JIT compiler is any good for performace reasons, especially with dynamic and/or long stretches of code.

The same applies to java, allthough the runtime environment is steadily becoming faster and faster, even surpassing c++ in some areas.
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: C# or C++

Postby Vilham on Wed Jul 15, 2009 4:21 pm

Well to start C# is actually more like java, C# was made by Microsoft to have more of the pluses of c++ while having the ease of java.

I started learning c# and got to grips with it in about 2 months. C++ however took me a whole year to get to the same point. I did however have more motivation for learning C# as it was for my dissertation.

Although blackdeaths comments are quite valid he isn't entirely correct. How you program only extends to so many languages, functional languages are nothing like Object Orientated languages. Functional programming is boring as shit, I wouldn't advise it, although if u do CS at uni u may have to learn one or two functional programming languages (ie writing a compiler for a made up language in Haskell).

So yeah start with an easy OO language. The easiest I have learn is probably Visual Basic and Java then C# then C++.
Designer - Frontier Developments
User avatar
Vilham
Frontier Developments
 
Joined: Tue Jul 29, 2008 10:22 pm
Location: Cambridge

Re: C# or C++

Postby mat_de_b on Wed Jul 15, 2009 4:53 pm

If you wanna make games and your just starting out it looks like C# and XNA are you're best bet, as i can promise you from personal experience that C++ and DirectX is a bitch...
User avatar
mat_de_b
Pheropod
Pheropod
 
Joined: Mon Apr 10, 2006 7:32 pm
Previous

Return to Web Design & Development

Who is online

Users browsing this forum: No registered users

cron