difference between C# C++ and Basic
#21
Posted 16 February 2011 - 04:39 PM
While I don't expect Smalltalk-like standard library from any language other than Smalltalk, C++ fails to meet even basic principles of code reuse. It's easy to reuse primitives like strings, stacks, vectors etc., but managing COM objects, service containers etc. becomes quite hard (don't give me the ATL argument). Managing Java Beans on the other side is quite easy.
The whole purpose of C++ is performance and some code reuse, but I believe only the first goal is achieved and that particular goal is achievable with pure C as well. Can you really tell your customers you'll boost the price of the product by $10 just to get one additional frame per second? Nope. Will they be happy that I can generate half of the code base from nicely structured, understandable, domain-specific UML models and then manually link the rest of the puzzle? Yes!
There is no single truth of course, but writing a whole game in just C++ sounds quite a bit of an overkill.
#22
Posted 16 February 2011 - 05:09 PM
For example, COM is a framework. In fact, Microsoft bills COM as a language-neutral concept that allows objects to communicate across systems, platforms, languages, etc. And, managed C++ is different from the broader concept of the C++ language itself.
Take C++, sprinkle in the right few libraries as needed, so as to minimize the amount of code you have to write in your project, and it's no less effective, efficient or satisfying that C# or Java.
The only difference is that C++, without libraries/frameworks, does less for you than C# without libraries/frameworks. That can be both a curse and a boon. What if you don't like how C# garbage collects? What if you have an actual need for multiple inheritance? What if you could make efficient use of pointers and be really user satisfied by it?
But, although the road you took seems wrong to me, the final conclusion is something I agree with: writing a whole game these days in C++ may not be your best option. Writing the non-critical parts in a productive, higher-level language like C# or Python, and cutting in the performance-critical parts with C is a useful, best-of-breed approach.
#23
Posted 16 February 2011 - 11:03 PM
alphadog said:
One problem with C++ in this scenario is that it doesn't have commonly accepted coding conventions, programming patterns and rich enough base API. This means that every library must implement it's own coding standards, which means libraries do not fit well together and have different look'n'feel in them: starting from basic error handling to parameter passing, memory handling. Even worse thing is that since there is no rich enough base API to use, every library must use a framework of some sort to do similar things. There are lots of boilerplate you need to write to make things interoperate in a nice way and it's not prettly really and even worse - it's not efficient in any way.
Quote
You are right that there are some features in C++ that someone might favor, but don't forget that there are many constructs in modern languages that are simply impossible to do in C++ in a sane way. For example C# has LINQ, support for anonymous delegates, etc. which have no C++ counterparts at all.
Quote
This one I think we all agree on, but that said I think that most games could do without C-coded parts completely and not even notice it.
#24
Posted 17 February 2011 - 12:03 AM
juhnu said:
Unless I misunderstand you, this is an issue pretty much for any language. Are you saying that all C# library/framework writers write with the same conventions and patterns, and create similar look-and-feel APIs?
juhnu said:
And, vice versa. That was exactly my counterpoint to Mihail121... perhaps poorly made. My point was that generally-speaking, selecting a language is selecting tradeoffs. C++ is not universally less useable, in toto, than C#. But, with that said, yes, there are tradeoffs. An OO language will be different than a functional language.
juhnu said:
Sure. And, C# isn't quite on par with Haskell. For example, the Haskell system of type classes is more "powerful" than the generic type system in C#.
As my own counterpoint, lambda functions and expressions are in the C++0x specification, and is already part of many compilers. So, you can get some lambda sugar in your C++, if you crave for it. But, you should make one type of language pretend its another.
#25
Posted 17 February 2011 - 08:08 AM
TheNut said:
-
Currently working on: the 3D engine for Tomb Raider.
#26
Posted 17 February 2011 - 11:19 AM
alphadog said:
Yes, that's exactly what I meant. Another thing is that since the .NET API is rich enough, the libraries do not need to reinvent the wheel or use some third party frameworks, which in turn makes them simpler and more lightweight to use and include in your project.
Quote
As my own counterpoint, lambda functions and expressions are in the C++0x specification, and is already part of many compilers. So, you can get some lambda sugar in your C++, if you crave for it. But, you should make one type of language pretend its another. :wacko:
Sure things can be in theory anything and what not, but it ultimately boils down to productivity/quality/usability in the end. I guess my original point was that "performance" shouldn't be the main factor deciding what language to use and people need to take account many other things, that are often much more important, as well.
#27
Posted 25 February 2011 - 08:18 PM
c# is for medium noobs
c++ is for non noobs
#28
Posted 25 February 2011 - 08:23 PM
and thats the sad truth
#29
Posted 25 February 2011 - 08:31 PM
enjoycrf said:
and thats the sad truth
I'll be sorry to disappoint you, but all three languages are Turing-complete, well accepted and in active use. "Learning" a language just because is not a wise choice, picking the right language for a specific job on the other hand is.
#30
Posted 25 February 2011 - 08:34 PM
listen to what you just said
its kind of like saying
being wise is not wise
#31
Posted 25 February 2011 - 09:05 PM
enjoycrf said:
c# is for medium noobs
c++ is for non noobs
Thank you for your in-depth evaluation and poignant comparison of the pros and cons of three major languages. I definitely learned a lot.
#32
Posted 26 February 2011 - 12:10 PM
enjoycrf said:
c# is for medium noobs
c++ is for non noobs
-
Currently working on: the 3D engine for Tomb Raider.
#33
Posted 13 August 2011 - 07:26 AM
(actually if im honest it was 8, i was begging my father for a computer at 7... i remember in year 2, "what do you want to be when you grow up?" "i want to be a computer programmer" :) )
#34
Posted 13 August 2011 - 02:03 PM
http://www.binpress.com/browse/c
#35
Posted 13 August 2011 - 05:59 PM
Im not sure I even knew what a computer was at that age, I was too busy climbing the cupboards. :)
#36
Posted 13 August 2011 - 06:16 PM
#37
Posted 14 August 2011 - 02:28 PM
http://www.binpress.com/browse/c
#38
Posted 14 August 2011 - 10:49 PM
#39
Posted 05 September 2011 - 02:21 AM
I have to agree with the post above that you need to know the base knowledge in game development or you might find it hard to cope up. Though I am sure that you will learn from whatever experience you pick up and from feedback from people you will hire, which I assume are professionals.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












