Archived

This topic is now archived and is closed to further replies.

wyrd

Did C# surpass C++ in popularity, or did I miss something?

Recommended Posts

wyrd    112
Disclaimer: This is not a which language is better post, please refer to one of the other 20 million threads on the subject. I''ve been out of the loop for a while, simply because I got busy with school and then finals. However, when I was frequently reading these forums, it was mostly C++ with a little bit of C# (people curious in the language). I even remember a time when C# was frowned upon and everyone just blatantly said "C++ is better." Now it seems almost backwards. C# threads left and right, and I''m hard pressed to find anything on C++. Have professionals started using C# to develop their games, or is this just a common trend for new folks and hobbiest? What exactly did I miss while I was gone?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
It''s a common trend for new folks and hobbiests. Corporations throw money around and people follow.

Share this post


Link to post
Share on other sites
Agony    3452
I''ve seen a reasonable number of C# threads, yes, but C++ still seems to be what is typically expected. If someone asks a question about what code would look like to do this or that, but don''t specify a language, a good number of people will [accidentally] assume C++ (myself included); most of the time it doesn''t matter, because C++ was what the person was asking about anyway. C++ is still the standard, but it does seem that C# is getting more common acceptance and interest than before. I myself might try to get my boss to get VS 2003, so I can learn .NET and the new VB and C#. I''ll still like my C++ though, I''m sure.

Share this post


Link to post
Share on other sites
Thygrrr    418
I personally dislike C# very much, and think it is utterly redundant as there is not a noticeable difference to Java (from my viewpoint, at least).

So, I''ll probably be one of those who stick with C++, which is a pretty good language (though far from perfect and on the bottom line worse than C#... which has its definitive upsides)

The Popularity discussion is far from decided yet, though on Microsoft Platforms, I expect C# to surpass C++ in the next years.

For Game Development, I don''t know. Probably the ease of use of C# makes it more popular with the newbies.


Moritz Voss
spirit.link.studios
www.optionoverkill.com

Share this post


Link to post
Share on other sites
deathtrap    364
quote:
Original post by Agony
I myself might try to get my boss to get VS 2003, so I can learn .NET and the new VB and C#. I''ll still like my C++ though, I''m sure.


You don''t need VS 2003 to use C#/VB and do any .NET programming.
There are other IDE''s out there, and the C#/VB compilers are free to use.

Share this post


Link to post
Share on other sites
Max_Payne    757
quote:
I even remember a time when C# was frowned upon and everyone just blatantly said "C++ is better."


I have been here for over 3 years and I don't remember any of that. I remember that many people always said "no language is better, each has its advantages, pick your own"... However, I remember that people who expressed that they didnt like C#, at any time, were frowned upon.

It has been getting more popular. Its still a relatively new language, and the "its new, and therefore automagically better" factor still accounts for it, even today. Some people like it, and think it makes them more productive... Personally, I think what people like about C# is not the language, which is not that innovative, but rather the winforms... Which replace the neglected and awful win32 API.

I personally don't like the whole "the pointers are the source of all evil" philosophy. I think people need to realise that the source of all bugs is not in the programming languages, but rather incompetence, negligence, procrastination and the "WE MUST DELIVER THIS SOFTWARE SUPER FAST" type of pressures.

Does C# have a future? Of course it does.... Microsoft has invested so much in it, and is progressively dropping support for other languages (the win32 API will most likely not be updated). To develop in a decent manner on windows, people will eventually be forced to use C#, and they will. People will follow microsoft, as usual.



Looking for a serious game project?
www.xgameproject.com

[edited by - Max_Payne on May 25, 2004 8:56:25 PM]

Share this post


Link to post
Share on other sites
clayasaurus    139
It is not surprising to see hobbiests want to use a language that is cleaner and easier to use than c++. As a hobbiest, I don''t care about speed as much as I care about maintaining my project and writing good clean reusable code that I can write a simple game with. No hobbiests are writing the next doom 3, and speed isn''t as much as an issue as maintainability is for us.

That said, I have chose my own alternative to c++. (http://www.digitalmars.com/d/). Why did i choose D? because I like it. Why do people use c# or any other language than c++? because they like it better.

Share this post


Link to post
Share on other sites
dmikesell    157
quote:
Original post by clayasaurus
It is not surprising to see hobbiests want to use a language that is cleaner and easier to use than c++. As a hobbiest, I don''t care about speed as much as I care about maintaining my project and writing good clean reusable code that I can write a simple game with.


Which of course is possible with C++. Languages don''t write clean or dirty code, programmers do.

Share this post


Link to post
Share on other sites
haro    502
quote:
Original post by dmikesell
Languages don''t write clean or dirty code, programmers do.


Preprocessor definitions/macros, bloated/obscure keywords, repulsive template syntax and stl overuse sure do help in writing dirty code though.

Share this post


Link to post
Share on other sites
Max_Payne    757
quote:
Original post by haro
quote:
Original post by dmikesell
Languages don't write clean or dirty code, programmers do.


Preprocessor definitions/macros, bloated/obscure keywords, repulsive template syntax and stl overuse sure do help in writing dirty code though.


In C++, the use of preprocessor definitions can be restricted to include guards. I don't know what keywords are possibly bloated and obscure (mutable is the only one I can think of, but even there, it makes sense) ? Are you thinking of the linux shell As for template syntax, its easy to understand, wheres the problem? And STL, how can you overuse it, its there to help you!



Looking for a serious game project?
www.xgameproject.com

[edited by - Max_Payne on May 26, 2004 11:35:36 AM]

Share this post


Link to post
Share on other sites
dmikesell    157
I love the preprocessor for certain things. For instance...


#ifdef DEBUG
#define DEBUG_PRT(args) printf args
#define ASSERT(cond) assert(cond)
#else
#define DEBUG_PRT(args)
#define ASSERT(cond)
#endif


DEBUG_PRT and ASSERT compile away to nothing in my release version, and the #ifdef is in one place. I don''t see what''s so nefarious about that.

Share this post


Link to post
Share on other sites
quote:
Original post by Thygrrr
I personally dislike C# very much, and think it is utterly redundant as there is not a noticeable difference to Java (from my viewpoint, at least).


I see it more as C# is what Java should have been.

quote:

For Game Development, I don''t know. Probably the ease of use of C# makes it more popular with the newbies.



Or more popular with those who find ease of implementation a good thing (a common notion among some of the more verbose software engineers, such as Martin Fowler, Kent Beck, and even those dastardly GoF guys).

Share this post


Link to post
Share on other sites
Over the past year to year and a half, not only have I begun doing most of my hobbyist work in C#, but the game programming I do for my day job has begun moving to C# as well...

I bear no ill will towards any programming language, but C# is an absolute pleasure to develop software in and right now it''s my favorite.

Share this post


Link to post
Share on other sites
dmikesell    157
quote:
Original post by Max_Payne
Doesn''t assert() already compile to nothing in release...



Looking for a serious game project?
www.xgameproject.com



Probably. I have my own custom assert function, however, that I call in my ASSERT macro (not shown in my last post).

Share this post


Link to post
Share on other sites
EvilSteve    139

IMO, C# is Microsoft''s attempt to divide the Java crowd and deal a blow to Sun. I would rather speak in a language that the entire industry has standardized upon and is independant of any company, than speak in a language that one company controls and could easily change or make obsolete for their own gains. This is why I prefer C++ over both C# and Java.

Share this post


Link to post
Share on other sites
Onemind    265
I generally use C++ over C#, mainly because of pointers (I use quite a lot of them). If I want a languge that takes care of pointers behind-the-scenes, I''ll use VB. I really think that Python, Ruby, and possibly Lua will end up being the next big language(s).

Share this post


Link to post
Share on other sites
neurokaotix    100
quote:
Original post by EvilSteve

IMO, C# is Microsoft's attempt to divide the Java crowd and deal a blow to Sun. I would rather speak in a language that the entire industry has standardized upon and is independant of any company, than speak in a language that one company controls and could easily change or make obsolete for their own gains. This is why I prefer C++ over both C# and Java.



I doubt C# was developed <edit>just</edit> to spite sun.

MindEngine Development | E-Commerce Business Architecture

[edited by - neurokaotix on May 26, 2004 4:11:27 PM]

Share this post


Link to post
Share on other sites
Arild Fines    968
quote:
Original post by Onemind
I generally use C++ over C#, mainly because of pointers


That''s a rather lame reason.

Pointers are a tool - a rather crummy tool at that. If you can achieve what you want without them, what''s the point of clinging onto such a low-level concept?

Share this post


Link to post
Share on other sites
EvilSteve    139

You''re using memory addresses no matter what language you''re using. It''s just a matter of whether or not the language thinks you should have access to them. In C++, you have the option to use them or not use them. In other languages, this decision is made for you.

Share this post


Link to post
Share on other sites
Arild Fines    968
quote:
Original post by EvilSteve

You''re using memory addresses no matter what language you''re using. It''s just a matter of whether or not the language thinks you should have access to them.


Which is completely beside the point. What do raw pointers give you in terms of expressiveness that you can''t get from the reference semantics of languages like C#, Python and Java?
quote:

In C++, you have the option to use them or not use them.


You have that option in C# as well, yet it''s very rarely used. This indicates that raw pointer functionality is something very few people actually need.

Of course, I can see pointers being very useful for the OMGIMSOL33T scriptkiddie crowd.

Share this post


Link to post
Share on other sites
Arild Fines    968
quote:
Original post by EvilSteve
In C++, you have the option to use them or not use them.


Actually, you don''t. For any non-trivial application, you are going to need heap-allocated memory. You can''t do that without pointers.

So C++ doesn''t give you an "option". C++ forces pointers down your throat whether you like it or not.

"C++ - An octopus created by nailing extra legs onto a dog."

Share this post


Link to post
Share on other sites
EvilSteve    139

Interfacing with the STL or OpenGL does not require pointers. I don''t consider C++ OpenGL apps to be trivial, or their programmers to be script kiddies.

Share this post


Link to post
Share on other sites
Arild Fines    968
quote:
Original post by EvilSteve

Interfacing with the STL or OpenGL does not require pointers.


That''s an API detail. I am talking about real applications. Are you saying you write your 3D engine using nothing but stack memory? No heap allocations whatsoever?

Are all your STL containers on the stack or in stack-allocated classes?

Also, looking at the OpenGL API spec, I see several functions taking pointers.

Share this post


Link to post
Share on other sites
EvilSteve    139

Sure, you can specify your vertices in OpenGL with glVertex3fv and use a pointer, or you can specify your vertices with glVertex3f and not use a pointer. There *are* OpenGL functions which use pointers, but you are not *required* to use them. This re-enforces my point, in C++ you have the option to use pointers or not to use pointers. In some other languages, you do not have this option.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.