Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


c++ or c#


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
40 replies to this topic

#21 The Reindeer Effect   Members   -  Reputation: 211

Like
0Likes
Like

Posted 02 May 2006 - 10:46 AM

I can't particularly comment on C#. But, if you choose C++ you can expect slower turnaround and much more systems hacking than with a higher-level language. You will inadvertently create an interpreter and runtime for your own ad-hoc programming language.

And worst of all ... it will be in C++.

Sponsor:

#22 adam23   Members   -  Reputation: 164

Like
0Likes
Like

Posted 02 May 2006 - 02:26 PM

Quote:
Original post by Arild Fines
Quote:
Original post by adam23
I prefer C++ because I have been using it for 4 years.

So next year you will prefer it because you have been using it for 5 years?



Funny :) but true.


#23 Quinn Johns   Members   -  Reputation: 102

Like
0Likes
Like

Posted 02 May 2006 - 08:56 PM

Quote:
Original post by Xpyder
Personally, I started game development (well..samples etc) in C++, making a basic RPG, and now I prefer C#.

C# is simpler, and easier to manage then ++, and in programs such as games (which you will want to re-use the code for later / make changes during development) this is essential.

I don't know much about the current state of the market, but my guess is the game industry needs to keep pumping out games, so they use what they know.

I can't imagine in 10+ years people will still be using ++, or another unmanaged language to create games.
Microsoft created C#, and they are also currently creating what will be the most advanced, and widely used OS in the world, thats got to mean something :)

James


... and that goes to say, C++ isn't owned by the Microsoft monopoly... hehe. Amen, to that. C++ > C#


#24 K_I_L_E_R   Members   -  Reputation: 142

Like
0Likes
Like

Posted 03 May 2006 - 03:57 AM

How does Microsoft own an ISO standard?
Both C# and C++ are ISO standards.


Quote:
Original post by QuinnJohns

... and that goes to say, C++ isn't owned by the Microsoft monopoly... hehe. Amen, to that. C++ > C#


OP:
Learn both but put a bit more effort into a single language when you begin learning, this way you can eventually pickup other languages with relative ease.

#25 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

0Likes

Posted 04 May 2006 - 01:25 AM

Quote:
Original post by K_I_L_E_R
How does Microsoft own an ISO standard?
Both C# and C++ are ISO standards.


But the C# implementation of Microsoft doesn't follow its own ISO standard. There are extra things no covered by the ISO.

The small "incompatibilities" that would make competitor's tools to look bad. That's why C# will always be a Microsoft owned language.



#26 rohde   Members   -  Reputation: 432

Like
0Likes
Like

Posted 04 May 2006 - 01:29 AM

Quote:
Original post by Anonymous Poster
Quote:
Original post by K_I_L_E_R
How does Microsoft own an ISO standard?
Both C# and C++ are ISO standards.


But the C# implementation of Microsoft doesn't follow its own ISO standard. There are extra things no covered by the ISO.

The small "incompatibilities" that would make competitor's tools to look bad. That's why C# will always be a Microsoft owned language.


AFAIK the language C# do follow the standard. It's true that MS has extension to that standard in the form of some parts of the API etc., but MS don't break the standard they only enhance it. Correct me if I'm wrong.
"We confess our little faults to persuade people that we have no large ones." -Francois de La Rochefoucauld (1613 - 1680). | My blog

#27 Josh Petrie   Moderators   -  Reputation: 5964

Like
0Likes
Like

Posted 04 May 2006 - 02:48 AM

Quote:

There are extra things no[t] covered by the ISO.


Which does not change the fact that it is still an ISO standard, and does not imply in any way the it is a "MS owned" language. Granted, Microsoft may have the best compiler and best support around for it, currently, but nothing is preventing that from changing.

Both MS and the guys working on GCC and just about every other compiler add compiler-specific extensions to the languages they can compile. That doesn't mean they "own" the language.

If you write code in any language that is not standard compliant because you've utilized a compiler-specific extension, that's really your fault, not the fault of the compiler writer.

To contribute to the discussion at hand:
C# and the .NET framework are amazing tools for rapid, robust tool development. Studios who don't adopt them for their tools departments in favor of continuing to maintain legacy C++ tools code will eventually suffer slower tool development turnaround and slower development processes in general due to the tool development turnaround time. Tools are very important to the development process and its critical that they don't go underestimated.

C++ will remain the language of choice (for better or for worse) for the majority of actual game development, especially on consoles, for a while longer.

#28 Arild Fines   Members   -  Reputation: 968

Like
0Likes
Like

Posted 04 May 2006 - 09:28 AM

Quote:
Original post by Anonymous Poster
Quote:
Original post by K_I_L_E_R
How does Microsoft own an ISO standard?
Both C# and C++ are ISO standards.


But the C# implementation of Microsoft doesn't follow its own ISO standard.

Apart from small, relatively irrelevant, inconsistencies, the C# compiler is compliant.
Quote:

There are extra things no covered by the ISO.

Ah yes, so linux distributions shouldn't offer things like GTK, QT etc since they are not covered by an ISO standard?

#29 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

0Likes

Posted 04 May 2006 - 10:11 AM

Quote:
Original post by rohde
AFAIK the language C# do follow the standard. It's true that MS has extension to that standard in the form of some parts of the API etc., but MS don't break the standard they only enhance it. Correct me if I'm wrong.


Which makes it incompatible with any alternative that might exist and destroys any chance for example of porting applications to other platforms easily.

This ISO standard talk is bulls***, Microsoft has unlimited resources if compared to any other company. BTW, this game is an old one, it's called "embrace, extend and extinguish", but instead of "enhancing" someone else's technology for killing them, they "enhance" their own for keeping any competitor away.

Playing "catch up" with Microsoft? Good luck! :)

#30 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

0Likes

Posted 04 May 2006 - 10:16 AM

Quote:
Original post by jpetrie
Which does not change the fact that it is still an ISO standard, and does not imply in any way the it is a "MS owned" language. Granted, Microsoft may have the best compiler and best support around for it, currently, but nothing is preventing that from changing.


See the answer above.

Quote:
Original post by jpetrie
If you write code in any language that is not standard compliant because you've utilized a compiler-specific extension, that's really your fault, not the fault of the compiler writer.


It's not about the compiler, it's about the API! Probably you are a C++ developer, you just don't get the value behind a standard (and big) API.

Quote:
Original post by jpetrie
To contribute to the discussion at hand:
C# and the .NET framework are amazing tools for rapid, robust tool development. Studios who don't adopt them for their tools departments in favor of continuing to maintain legacy C++ tools code will eventually suffer slower tool development turnaround and slower development processes in general due to the tool development turnaround time. Tools are very important to the development process and its critical that they don't go underestimated.


And what does it have to do with what I said? And as far as I know there are many better alternatives than Visual Studio, that wouldn't keep you locked with Microsoft (rebuy your software every 2 years, forget any backward compatibility, etc).



#31 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

0Likes

Posted 04 May 2006 - 10:20 AM

Quote:
Original post by Arild Fines
Apart from small, relatively irrelevant, inconsistencies, the C# compiler is compliant.


Do you develop softwares from scratch, with zero API? Just a reality check.

Quote:
Original post by Arild Fines
Ah yes, so linux distributions shouldn't offer things like GTK, QT etc since they are not covered by an ISO standard?


No, there should be a standard API for the platform. Extra stuff is extra stuff, i.e., something else you use if you want to.

The point is you can't get a Visual Studio project, open it on Linux and simply run it. For doing that you need to be "extra-careful" because there're no guarantees about the APIs (the ISO doesn't cover that).


#32 Josh Petrie   Moderators   -  Reputation: 5964

Like
0Likes
Like

Posted 05 May 2006 - 01:49 AM

Quote:

The point is you can't get a Visual Studio project, open it on Linux and simply run it. For doing that you need to be "extra-careful" because there're no guarantees about the APIs (the ISO doesn't cover that).


Well...yeah. You can't create a project in Ajuta, open it on Windos and simply run it. Nor can you take a project from xCode, open it on Windows or Linux and simply run it (xCode is a Mac OS X IDE, just in case). I fail to see what point you are trying to make. It's seems you've shifted from arguing that the language is not platform agnostic (it is), to a specific toolset is not platform agnostic (in which case you are correct but the converse is also true, as I just mentioned).

Quote:

It's not about the compiler, it's about the API! Probably you are a C++ developer, you just don't get the value behind a standard (and big) API.

C++ has a big, standard library, so yes, I understand its value. And while I do develop with C++, I also use C# and other languages. I also understand that it is not the job of the ISO standard committee or, neccessarily, a specific company (viz., Microsoft) to define a standard API along with the language that covers all possible aspects of development you could do with the language (such as interface with windowing systems for a particular OS).

Quote:

And as far as I know there are many better alternatives than Visual Studio, that wouldn't keep you locked with Microsoft (rebuy your software every 2 years, forget any backward compatibility, etc).

For C#, I don't know of any for Windows, so in this case you almost have a valid point. But as far as C++ goes, I've had VS2003 for more than two years, now, and before that owned VC++6 for quite a while. I have not yet purchased VS2005 and I currently see no pressing need to. Back when VC++6 was around there were better alternatives in IDEs, but now I prefer the VS IDE to anything else. This is just personal preference, of course. But I have not had any problems with backwards compatibility with my project files, or the code itself.

I'm curious what problems you have had that make you say that? Or are you just jumping on the "Microsoft is evil" bandwagon without any actual relevant experience? Microsoft makes some bad decisions and turns out some poor products, but Visual Studio is not one of them.

Quote:

And what does it have to do with what I said?

It has nothing to do with what you said, I was trying to contribute to the OP's original question before this got too off-topic.

#33 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

0Likes

Posted 05 May 2006 - 05:38 AM

Quote:
Original post by jpetrie
Well...yeah. You can't create a project in Ajuta, open it on Windos and simply run it. Nor can you take a project from xCode, open it on Windows or Linux and simply run it (xCode is a Mac OS X IDE, just in case). I fail to see what point you are trying to make. It's seems you've shifted from arguing that the language is not platform agnostic (it is), to a specific toolset is not platform agnostic (in which case you are correct but the converse is also true, as I just mentioned).


Developers need a set of tools to work. These tools include MORE than just the compiler. If the API is not compatible the whole thing won't be portable!! It doesn't matter if you have a version produced by some other company if anything I develop using Microsoft's implementation won't work in any of the competitor's tools.

I'm not talking about extensions to compilers, I'm talking about the APIs. If they aren't there then:

a) you are dead;
b) or you'll have to work around it (extra $$ in development hours, higher maintanability costs because of different code bases, etc.);

I believe this ISO thing it's just another plan to lock people in Windows platform. It's not really for creating an ecology for it, it exists more for marketing people to say "but it's an ISO standard!... it has implementations in other platforms!" when someone says Microsoft owns it.

Other languages and platforms do have standard APIs and tools that run on several platforms. And yes, it's possible to write something on Windows open it on Linux and just run it.

Quote:
Original post by jpetrie
C++ has a big, standard library, so yes, I understand its value. And while I do develop with C++, I also use C# and other languages. I also understand that it is not the job of the ISO standard committee or, neccessarily, a specific company (viz., Microsoft) to define a standard API along with the language that covers all possible aspects of development you could do with the language (such as interface with windowing systems for a particular OS).


I think the problem with C++ developers is that they use the OS as the "platform", so they can't imagine having a common platform above the OS. The API is a vital part of modern software development, you just don't expect people to write everything from scratch.

If I am unable to write a program in Microsoft's C# and run it on Linux the whole portability talk is gone. And for that you would need to have a set of core APIs, at least, found everywhere for the common tasks including db access, window management, etc.

Now, what's the point of an "ISO standard" if you are going to be locked in Windows and with Microsoft forever and ever? That's why Microsoft owns it.

#34 Josh Petrie   Moderators   -  Reputation: 5964

Like
0Likes
Like

Posted 05 May 2006 - 06:40 AM

Quote:

Developers need a set of tools to work. These tools include MORE than just the compiler. If the API is not compatible the whole thing won't be portable!! It doesn't matter if you have a version produced by some other company if anything I develop using Microsoft's implementation won't work in any of the competitor's tools.


Well this is why you need to make intelligent decisions at the start of a project; if you know cross-platform capability will, or might eventually, be a requirement don't select D3D for your rendering API; things along those lines.

Maybe we're just having a discussion with the same words but we're both thinking about different actual things, but it really seems to me your advocating that *everything* should cross-platform and compatible with everything else, which is really just an unreasonable expectation.

If you are going to use C#, find a different windowing API than Windows Forms, which is obviously a Windows specific API. Find a different API than the .NET framework, which is SUPPOSED to be cross-platform (but Mono is kinda, well... not quite there yet). For C#, maybe there are not so many choices yet, but C#'s is a relatively young language yet, especially compared to C++. I don't think C# (and the available C# APIs) are in quite dire straits as Objective-C (and its available APIs). Objective-C is older than C# (around since '86 or so) and its still basically limited to OpenStep and Cocoa on OS X. I don't think its really fair to accuse Microsoft of anything malicious with regard to C#, given that.

Quote:

I think the problem with C++ developers is that they use the OS as the "platform", so they can't imagine having a common platform above the OS. The API is a vital part of modern software development, you just don't expect people to write everything from scratch.


Of course not, but I don't expect every API to meet my exacting needs, either. If I needed to access graphics hardware in a cross-platform manner I'd make use of OpenGL, not D3D.

Quote:

Now, what's the point of an "ISO standard" if you are going to be locked in Windows and with Microsoft forever and ever? That's why Microsoft owns it.

Once again, it's not Microsoft's fault. I don't fault Sony for not making their PS3 API's work on xBox 360 hardware.

Quote:

I'm not talking about extensions to compilers, I'm talking about the APIs. If they aren't there then:

a) you are dead;
b) or you'll have to work around it (extra $$ in development hours, higher maintanability costs because of different code bases, etc.);


Again, this all boils down to thinking ahead and picking the right tool for the job. C#'s lack of strong cross-platform windowing API support, for example, is classified as a risk. While Mono may or may not end up not sucking, and somebody else may come along and provide a cross-platform API with the same power and ease of use as Windows Forms, its possible that it won't happen and may be effectively stuck, as you've said. But if that risk is critical enough, you need to select a different tool (in this case a different language) that provides what you want.

If you buy a hammer from a toolsmith, you can't fault him for not selling you the shovel that you actually wanted, unless he had no shovels in stock. In which case you should have gone to a different toolsmith.

#35 sebastiansylvan   Members   -  Reputation: 166

Like
0Likes
Like

Posted 05 May 2006 - 09:20 AM

C++ is currently used more today, but it *is* changing.

I personally don't think C++ will stay ahead for long. The main reason for that is the complete lack of language support for concurrency and the robustness problems that comes with writing languages in unsafe languages. I wouldn't say C# is necessarily the best candidate for "the next games programming language" but it seems quite clear to me that all signs point towards getting rid of C++ and starting fresh without all that messy legacy.

So, I would say that you should use C#, but be very aware that the language you use isn't something which isn't going to change. You should try to learn many new languages to broaden your horizon. But I wouldn't recommend C++, you'll just spend far too much time chasing down bugs and writing test cases -- it's just not worth the hassle if you don't have a really good reason for doing it.

Regarding the discussion on the supposed non-compliance of MS C# compiler and any portabilyt concerns that comes with that. I won't get into it, but if anyone is using *that* as an argument to use C++ instead, they really need to try porting a major C++ project sometime. As far as I know there doesn't even exist a single fully-working C++ compiler yet (they all just do subsets because the language is so cluttered and big that nobody has managed to implement a compiler for it yet - the most common omission is probably "export typename"), and the half-finished implementations that exist rarely agree on the finer points of the language.

#36 zedzeek   Members   -  Reputation: 528

Like
0Likes
Like

Posted 05 May 2006 - 10:25 AM

is it possible to use c# on the ps3, if not then u would see the big commericial companies using c# in their games for 5 years (at least)

#37 etothex   Members   -  Reputation: 728

Like
0Likes
Like

Posted 05 May 2006 - 08:40 PM

I was pretty hot on Java for a while, but then had to do a few class projects in C++ and started to appreciate it and its power more, not to mention the substantial amount of code resources avaliable.

I considered C# for a while, but then decided that the features I liked the most were also in Java, and it shared some of the same issues that turned me off. The fact that Mono isn't quite "there" yet on other platforms the same way Sun Java is, didn't help convince me to switch yet.

However, now that I'm back to using "unmanaged" C++, I'm considering trying C++/CLR. If I had time, I might look more into it.

#38 Surg   Members   -  Reputation: 100

Like
0Likes
Like

Posted 05 May 2006 - 08:51 PM

I like C++ becuase its more powerfull and better supported. Its preety annoying when people say things like C++ isn't safe and it is hard and evil. Sure you can make memmory leaks, if you don't know what you are doing, but a simple garbage collection system isn't hard to make, and it can be customized more. To the OP, C++ is at the top, but C# is being used a lot more, mostly by hobbyists from what I can see(I use both, they feel the same to me... all languages do)

#39 cody   Members   -  Reputation: 199

Like
0Likes
Like

Posted 05 May 2006 - 10:31 PM

this is why i think c# is better for most programing projects:

- much faster to write. c++ syntax is so extremely redundant. in every header you have to write #ifndef HEADER #define HEADER... then you also have to write every function declaration twice. one for the header, and one for the implementation. this sucks.

- c# might be even more cross-platform than c++. at least for a hobby game developer. from what i have heard, you cant develop for consoles like ps3 with c++ either, as you need some sdk for it and maybe some special hardware.
when writing a non-gui c# program, you write it on windows, and its quite sure that it will run on linux without any modification. you wont even have to recompile.

- on linux its quite nice, that you can distribute .net programs without having to care about which distribution the user has. you dont have to care which version libc is. i think its possible to do this with c++, too, but i have seen many programs that cause problems with it.

i currently see some disadvantages, too:
- mono's performance seams to be bad on some code.(but most time it is ok)
- lack of a standard gui. you can use gtk# though and winforms support gets better on mono, so it will be quite usable soon i guess. but if you just want a cross-platform gui app, java might be better.

#40 Moomin   Members   -  Reputation: 332

Like
0Likes
Like

Posted 05 May 2006 - 10:46 PM

Quote:
Original post by Marius
Nomatter how will be... allways "C is faster than C++ and C++ is faster than C#/Java".

I think this will not always be true. Vista will used a managed code base and so C# and C++(managed) will run faster than C and C++. (Although I am unable to find it, I am sure I have read this in a thread on this board.)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS