C++ vs. C#?

Status
Not open for further replies.
Just to add something to this discussion, not to bring to life a dead subject, but I have used quite a bit of languages professionally, and that includes C++ and C#.

Currently our company's application (non web based) is written in C#. I also created a framework based in C# (about 250,000 lines of C# code) to do some of the advanced work required of our web based code. Seriously advanced stuff. Its only unfortunate that I make an executive decision to rewrite the entire code in a different language.

One of the disadvantages to C#, as mentioned previously, is Microsoft. We are migrating to Linux for various reasons and while C# can be used in linux, it is not native and frankly embarrassing. It also takes a slight performance hit over the windows one, which is worse still because C# is the most bloated language i've ever used, and it was already slow as heck. C#'s worst features are its memory management system and the requirements to use one of thousands of independent "objects" to do very specific things in the system. Its like, if Microsoft hasn't given you PERMISSION to use a feature, then your out of luck. What ever happened to being able to use the Windows API? Its such a silly North Korea style language that's its actually funny. I could rant on and on about C#'s disadvantages, but on the plus side, when you have memorized at least 500 of its freaking helper objects, programming things can be a breeze and highly intuitive. In fact, dot net is the most out-of-the-box intuitive programming platform i've used yet, and i've used alot of web platforms. But when you eventually look under the hood, you wonder why you didn't read the fine print before you got knee deep in the development :dead:

C++ Is a wonderful language for platform-specific game development. It is best suited, in my opinion, for creating low to medium level game libraries and other foundational components. I would definitely not recommend it for high level scripting of game logic. It would be too difficult and counter productive. At least use some kind of XML style parser to connect graphics components and geometry to objects and their functions.

One of my main issues with C++ is that its compiled code is not as nice as it would be in C. It does more work with type casting which means its conditional functions are almost always larger than its C counterpart. New and Delete operators are of course more complex than its C counterparts, and of course objects align and name mangle in automatic ways (at least in my experience) and it forces you to use special non C++ standard keywords to help it compile as you want it to. [NOTE: Most programmers will probably be confused right now at what I am talking about. 99.9% of the time these concerns doesn't matter, but i'm hardcore for a reason.]

That's why if you are going to write code for non PSOC Microcontrollers, CPU's, create a platform, an operating system, or basically anything where you need direct access to the computer's resources, or anything in which speed is super critical (like to write low level code for a physics engine or graphics engine), then C is your ONLY language. It compiles like magic and rainbows, creating elegant assembly code. Everything is predictable. It has a powerful library, and one of the lowest number of keywords of any modern computer language, so its simple to learn its full features. But I would not recommend to an average programmer to use C to create high level programs because its highly unmanaged, so memory leaks and memory overruns would be more common than in other languages.

By the way, most people will tell you C# is the most highly managed language out there (north korea :sick:), but I've exploited some holes in its design that allowed me to crash its engine. Its probably fixed by now. :silly:
 
Status
Not open for further replies.
Back
Top Bottom