Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

878781 Posts in 32936 Topics- by 24346 Members - Latest Member: Vuoripeikko

May 22, 2013, 04:20:12 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)What are the differences between C++ and C#
Pages: 1 2 3 [4] 5
Print
Author Topic: What are the differences between C++ and C#  (Read 14091 times)
raigan
Level 4
****


View Profile
« Reply #45 on: November 23, 2008, 05:11:04 AM »

B) show that the game sell (like Darwinia -> Darwinia+ ).

AFAIK Darwinia was written in C/C++ to start with..
Logged
increpare
Guest
« Reply #46 on: November 23, 2008, 09:49:55 AM »

B) show that the game sell (like Darwinia -> Darwinia+ ).

AFAIK Darwinia was written in C/C++ to start with..
I think that was the point?
Logged
Zaratustra
Level 7
**



View Profile WWW Email
« Reply #47 on: December 04, 2008, 03:40:57 AM »

C++ is a development of C which implements object-oriented programming and exception handling.

C# is Java with a silly hat on.
Logged

Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW Email
« Reply #48 on: December 04, 2008, 03:49:08 AM »

good bump
Logged

Cymon
Level 9
****


Computer Kid


View Profile WWW Email
« Reply #49 on: December 06, 2008, 11:50:02 AM »

C++ is a development of C which implements object-oriented programming and exception handling.

C# is Java with a silly hat on.
Logged

Cymon's Games, free source code, tutorials, and a new game every week!
Follow me on twitter
Zaknafein
Level 4
****


renaud.bedard@gmail.com
View Profile WWW Email
« Reply #50 on: December 06, 2008, 01:42:29 PM »

Some of us enjoy silly hats. Gentleman
Logged

Scolo
Level 0
**


Justin Dempsey


View Profile WWW Email
« Reply #51 on: December 06, 2008, 05:58:18 PM »

c++ has balls
Logged
Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW Email
« Reply #52 on: December 07, 2008, 11:46:39 PM »

C++ is a development of C which implements object-oriented programming and exception handling.

C# is Java with a silly hat on.
hehe you agree with this? figures
Logged

nihilocrat
Level 10
*****


Full of stars.


View Profile WWW Email
« Reply #53 on: December 13, 2008, 12:31:31 PM »

c++ has balls

Yes, that's true, but it means it's not particularly uncommon to get kicked in the balls with that language.
Logged

Cymon
Level 9
****


Computer Kid


View Profile WWW Email
« Reply #54 on: December 13, 2008, 12:42:50 PM »

C++ is a development of C which implements object-oriented programming and exception handling.

C# is Java with a silly hat on.
hehe you agree with this? figures
Actually I think C# is vb with a silly hat, but that statement was close enough.

c++ has balls

Yes, that's true, but it means it's not particularly uncommon to get kicked in the balls with that language.
That's why when you program in C++ you should always wear a cup.
Logged

Cymon's Games, free source code, tutorials, and a new game every week!
Follow me on twitter
Craig Stern
Level 10
*****


I'm not actually all that stern.


View Profile WWW Email
« Reply #55 on: December 14, 2008, 12:43:39 PM »

How is Python for OOC? I want to learn a real programming language one of these days (i.e. something besides Actionscript), and Python seems to be the one everyone agrees is good to start with.
Logged

William Laub
Level 10
*****


Gold Cray


View Profile WWW Email
« Reply #56 on: December 14, 2008, 01:26:32 PM »

I haven't done much with it, but I have done enough to know that Python is pretty cool to code in. I think it's probably just as good for OOC as C++ is.
Logged

Digital Modular Theremin: A new KiNd of Theremin<br />C C++ Python Verilog Java VBA C# Fortran
David Pittman
Level 2
**


caffeine?? NO!!


View Profile WWW Email
« Reply #57 on: December 14, 2008, 01:30:57 PM »

Python's probably not the best language for learning good object-oriented practices because all class members are public with limited support for hiding anything. In fact, much of Python's OO support appears to be a bit of a hack, such as explicitly passing the self parameter to member functions. That said, it is a fun little language with some great libraries (pygame, pyglet, etc.) for game development.

C#, Java, and even C++ seem to have more "pure" implementations of the OOP paradigm, with better support for information hiding than Python and with inheritance-based polymorphism (because they are all strongly-typed languages compared to Python's dynamic typing that effectively makes everything polymorphic). That doesn't mean they're better or more powerful languages--you can do anything in one that you can do in the others. What's really important is how expressive you can be and how much the language keeps you from shooting yourself in the foot while doing it.
Logged

Games: Davy - SecOrd - TKtics - GRO - Cutie - CC1984 - SV
BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #58 on: December 14, 2008, 03:01:54 PM »

Feh, the self thing is apparently by design, python does have an intrinsic understanding of classes (e.g. "bound" functions). And it is a super fun language. But yeah, it's not pure OO, much like it's not pure anything. Python consistently takes the middle route on that sort of thing. However, that doesn't mean it's bad for OO coding, quite the contrary. Duck typing means not having to waste time with expansive inheritance hierarchies, and more or less instant polymorphism. Creating classes and objects is cheap, and, I think rarely for a dynamic language, it supports multiple inheritance.

Private variables are hacky, but that's because they are more a mechanism to avoid namespace clashing, not ecapsulation. The point is that dynamic languages do not have such a strict design contract on what objects can and can't have, so this naturally blurs the distinction between public and private.
Logged
Sar
Level 3
***


Likes Violins


View Profile WWW
« Reply #59 on: December 19, 2008, 06:44:23 AM »

Normally I know better than to jump into silly arguments almost a week late, but what the hell. I've got 40 minutes before a meeting before I can get on with meaningful work.

Actually I think C# is vb with a silly hat

And I think C++ is assembly in a cheap suit.

Fundamentally, back in the dark ages, people wrote code directly in the instruction set the hardware understood, and it was fine because that's all that we had.

Then some bright spark invented the high-level language, and all the people who'd spent days of their lives understanding how to program in assembly stood around tutting scornfully and saying how it would never catch on, because everyone knows that if you want your program to perform well you need to write directly in assembly. Except, you know, within a decade or so compiler design had advanced to the point that the average compiler really could optimise your code better than the average programmer could, and the conveniences of HLLs far outweighed the drawbacks and everyone recognised the people who still programmed in assembly for what they were - grognards who didn't want to let go of what they'd learned or liked to feel superior understanding the computer at a lower level than everyone else.

Then, a little while later, some clever guy invented memory-safe garbage-collecting runtime environments and JIT bytecode compilers and all those things C# and Java rely on, and a lot of the C++ programmers are standing around tutting scornfully and saying how it'll never catch on, because everyone knows that if you want your program to perform well you have to write code with pointers and manual memory allocation and all that guff. They've learned C++ and because it's easier to code in C#, they're presuming that it's not so good... or like the feeling of superiority they get from knowing things C# developers don't, or maybe even genuinely feel they can't get the job done if they don't get to create access violations at will. The amount of bollocks spouted about it in this thread alone demonstrates that a good number of them don't even bother to learn how it works before deriding it.


Now, there was a bit missed off the beginning of the story - right at the beginning, people didn't even have assembly - they had to make hardware to do what they wanted. And people still do that, for a vanishingly small set of applications, like the kind of hardware you get in GPUs. And people still write assembly for some small, specialised set of circumstances, because it genuinely is the best answer sometimes. And I have no doubt that people will continue to use direct-memory-manipulation high-level languages like C++ for an increasingly small set of applications as we go forward. C# apps run on top of a layer of C++ code which quite possibly runs on top of some hand-crafted assembler which runs on purpose-built hardware.

But I also quite seriously expect that - while it may take another ten years - serious development going forward will increasingly use languages and runtimes like C# over languages like C++, because the performance loss genuinely is negligible a lot of the time (in fact, due to things like the way the GC allocates large chunks of memory in advance, in some situations it outperforms natively-compiled C++) and because the advantages to the programmer truly are great and useful. When those advantages outweigh the disadvantages in a field, that field will transition over to the new thing. It's already happening in business software, I see it as only a matter of time for games. Maybe it won't be C#, maybe it'll be some other language/runtime that comes along later, but I'm pretty sure it'll happen.


And ten/fifteen years after that, some smart-arse will come up with an even better way of coding, and I'll be writing derisive posts to Internet forums telling kids that it'll never catch on, because everyone knows that the GC/bytecode-JIT model is best for performance.
Logged

Currently working on: Chronicle of Mars
Previous Projects: [Käfer|Tristan and Iseult(TIGS)]
Pages: 1 2 3 [4] 5
Print
Jump to:  

Theme orange-lt created by panic