Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1] 2   Go Down

Author Topic: Which Language; C++ or C#?  (Read 5601 times)

0 Members and 1 Guest are viewing this topic.
Which Language; C++ or C#?
« on: October 25, 2007, 03:01:38 am »
  • :D
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2418
Which one should I learn?  I have books lying around for both, and I really need to commit myself to one or the other.

Which one is more powerful, and which one is more limited?  I just don't know !@#$% about these things.

If you are just going to tell me not to use a certain language because it's "proprietary blah blah blah", please stay out.
Logged
Re: Which Language C++ or C#?
« Reply #1 on: October 25, 2007, 03:02:57 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1066
Which one should I learn?  I have books lying around for both, and I really need to commit myself to one or the other.

Which one is more powerful, and which one is more limited?  I just don't know !@#$% about these things.

C# is bloated and the most common implementation is proprietary.

C# does some things like Java, while C++ can access the low-level stuff.
Logged

Source

Internet Tough Guy.
Re: Which Language; C++ or C#?
« Reply #2 on: October 25, 2007, 03:16:39 am »
  • Things to see and people to do.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2289
Which one should I learn?  I have books lying around for both, and I really need to commit myself to one or the other.

Which one is more powerful, and which one is more limited?  I just don't know !@#$% about these things.

If you are just going to tell me not to use a certain language because it's "proprietary blah blah blah", please stay out.

C# (C Sharp) is built to work with the .NET framework. It can essentially be used for anything: standalone programs, DLLs, and web pages (ASP.NET). It's a higher level language, and is a totally different beast than C++.

Then again, this is coming from skimming a few pages of The C# Bible, so meh.
Logged
The very existence of flamethrowers proves that sometime, somewhere, someone thought to themselves "You know, I really want to set those people over there on fire." - George Carlin

(!@#$%)

Hear the haunting words (They'll find you alone)
lost children with no heart are crying (Turning their hearts into stone)
and you're the lost mother they're calling
Go now, run and hide (seek more than vengeance)
I hear them crying at night (your pain is their satisfaction)
outside when the planets are falling (for the rest of time)
They want to feel and know you hear them (Go now, run and hide)

  • http://giantcock.netne.net/
Re: Which Language; C++ or C#?
« Reply #3 on: October 25, 2007, 03:22:51 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1066
Which one should I learn?  I have books lying around for both, and I really need to commit myself to one or the other.

Which one is more powerful, and which one is more limited?  I just don't know !@#$% about these things.

If you are just going to tell me not to use a certain language because it's "proprietary blah blah blah", please stay out.

C# (C Sharp) is built to work with the .NET framework. It can essentially be used for anything: standalone programs, DLLs, and web pages (ASP.NET). It's a higher level language, and is a totally different beast than C++.

Then again, this is coming from skimming a few pages of The C# Bible, so meh.
I would completely avoid using it unless you're using Mono.
Logged
Re: Which Language; C++ or C#?
« Reply #4 on: October 25, 2007, 09:43:44 am »
  • (y)(;>.<;)(y)
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3293
But that's you, and as I've said, you come to this forum to !@#$% ;)

Anyway, C# is more flexible and a very similar syntax to C++, if anything it improves some aspects. However this sacrifices in many ways C++'s low-level functionality, which isn't that commonly used anyway.

You don't have to actually type out command names for just about ANYTHING in it because a menu will always appear :P

My one complaint is the lack of pointers without having to declare code as unsafe. I'm aware that they are ways around using pointers, but sometimes * is just sooo much easier  :(
Logged
Re: Which Language; C++ or C#?
« Reply #5 on: October 25, 2007, 03:56:44 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
Depends what you need it for really. C++ is brilliant for low level access but it does have a horribly obtuse and bloated syntax, mainly due to the fact that its essentially just C with a crude for of OOP slapped on. C# is higher level (though it does permit low-level code) and far easier to use and be productive with, its OOP interface is also far more cleaned up than C++'s. However that said as people have noted, it is propriatary and as such cross-compatiblity is an issue with it, if however your only after Windows development then its not a huge problem.

Quote
My one complaint is the lack of pointers without having to declare code as unsafe. I'm aware that they are ways around using pointers, but sometimes * is just sooo much easier 
You must be doing some pretty wierd stuff to find it easier to use pointers.
Logged
Re: Which Language; C++ or C#?
« Reply #6 on: October 25, 2007, 05:27:04 pm »
  • Doesn't afraid of anything
  • *
  • Reputation: +42/-0
  • Offline Offline
  • Gender: Male
  • Posts: 7002
Quote
My one complaint is the lack of pointers without having to declare code as unsafe. I'm aware that they are ways around using pointers, but sometimes * is just sooo much easier

O_o What are you doing that makes pointers easy?

also, WTF INFINITUS IS HERE?????
Logged



i love big weenies and i cannot lie
Re: Which Language; C++ or C#?
« Reply #7 on: October 25, 2007, 05:34:10 pm »
  • The devil in the mirror.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 238
C++ is cross ...anything actually, there is little you can't make stuff for with C++
C++ is a bit harder than C#.

C# is only for windows, and requires users to have a .NET framework installed(!@#$% if you ask me)
C# is a bit easier, yet sacrifices some low level stuff(As said above)

The thing about menus for C#, that is all up to the IDE you use, I have seen menu's where you can just press the mouse(or enter) and the command/function automatically fills in for C/C++, but it's built into the C# IDE.

Away from this, it's actually just test and see which one YOU like, and think would fit your needs.
Logged
Working on my Masters Degree in Computer Science.
Hey look, Zelda Coop....later.
Proud user of C++ for 9 years, and counting!
Re: Which Language; C++ or C#?
« Reply #8 on: October 25, 2007, 05:55:58 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1066
Depends what you need it for really. C++ is brilliant for low level access but it does have a horribly obtuse and bloated syntax, mainly due to the fact that its essentially just C with a crude for of OOP slapped on. C# is higher level (though it does permit low-level code) and far easier to use and be productive with, its OOP interface is also far more cleaned up than C++'s. However that said as people have noted, it is propriatary and as such cross-compatiblity is an issue with it, if however your only after Windows development then its not a huge problem.

Quote
My one complaint is the lack of pointers without having to declare code as unsafe. I'm aware that they are ways around using pointers, but sometimes * is just sooo much easier 
You must be doing some pretty wierd stuff to find it easier to use pointers.
You should NEVER be only after Windows development. I think Mono is cross-platform, but I'm not sure.
Logged
Re: Which Language; C++ or C#?
« Reply #9 on: October 25, 2007, 08:34:27 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1141
C, C++ and C# are all able to do the same things, i.e. there's nothing you can't do in C that you can do in C++ or C# or vice-versa. What changes is the way the code is typed and the efficiency of the program created.

C is the easiest IMO, though it's too low-level and sometimes you have to type a lot more than in C++/C#.
C++ is more flexible than C and it's the most efficient/dynamic (as far as I know) but it's the hardest.
C# is easier than C++, as it's said that C++ uses "a horribly obtuse and bloated syntax". C# is the most high-level of the three, but there are people (like me) who don't like it because it removed many useful low-level features of C/C++ and replaced with new higher-level ones. Also I'm not sure, but I've heard C# is slower and the .exe file is bigger (OBS: Please correct me if I'm wrong anyway)

NOTE: If you don't know what's high-level/low-level, I'd say that... high-level is sort of a more abstract language (nearer the human way of organising thoughts), while low-level is more direct (nearer machine code). I prefer low-level though.


EDIT: Also, pointers pwn; this is one of the most useful features I've ever learned. In fact they're not used much in programs such as games or in order to make an A.I. function, etc.; but it's very useful when you want to edit a byte in the middle of the computer memory. Or when you want to switch between multiple variables and classes of different datatypes, using memory in a more dynamic way. And using pointers sometimes allow you to run a function much faster, depending on the function.
« Last Edit: October 25, 2007, 08:43:48 pm by sjegtp »
Logged
Re: Which Language; C++ or C#?
« Reply #10 on: October 25, 2007, 10:46:45 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
Quote
C, C++ and C# are all able to do the same things, i.e. there's nothing you can't do in C that you can do in C++ or C# or vice-versa. What changes is the way the code is typed and the efficiency of the program created.
Goner have to correct you there. There are quite a few variations on what you can do, manual memory management for example :P.
Depends what you need it for really. C++ is brilliant for low level access but it does have a horribly obtuse and bloated syntax, mainly due to the fact that its essentially just C with a crude for of OOP slapped on. C# is higher level (though it does permit low-level code) and far easier to use and be productive with, its OOP interface is also far more cleaned up than C++'s. However that said as people have noted, it is propriatary and as such cross-compatiblity is an issue with it, if however your only after Windows development then its not a huge problem.

Quote
My one complaint is the lack of pointers without having to declare code as unsafe. I'm aware that they are ways around using pointers, but sometimes * is just sooo much easier 
You must be doing some pretty wierd stuff to find it easier to use pointers.
You should NEVER be only after Windows development. I think Mono is cross-platform, but I'm not sure.
You may wish to develop on other platforms, but in the majority of cases people won't wish to as they have little or no user-base on the other platforms and as such don't wish to go through the complexity of maintaining a cross-compatible application if no-one is going to use it.
Logged
Re: Which Language; C++ or C#?
« Reply #11 on: October 25, 2007, 11:17:47 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1141
manual memory management for example :P.
<.< ... You can't do that in C#? How come......
Logged
Re: Which Language; C++ or C#?
« Reply #12 on: October 26, 2007, 09:34:34 am »
  • (y)(;>.<;)(y)
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3293
I somehow created a game engine and thought "You know what? Rather than make the Wrapper global, I'll just bang it into the CEngine class and give everything that could use it a pointer to it"...stupid, maybe. Easy, yes.
Logged

Mamoruanime

@Mamoruanime
Re: Which Language; C++ or C#?
« Reply #13 on: October 26, 2007, 09:43:05 am »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
Quote
C, C++ and C# are all able to do the same things, i.e. there's nothing you can't do in C that you can do in C++ or C# or vice-versa. What changes is the way the code is typed and the efficiency of the program created.
Goner have to correct you there. There are quite a few variations on what you can do, manual memory management for example :P.

Couldn't you just make a class to handle that? (or if need be, subclass an existing class o.0) I'm sure theres ways around it; thats one of the joys of C# (and most of .net, for that matter o.0)

I personally prefer C#. Mainly because its far less difficult to use and not quite as bulky as C++ is. I hate the idea of coding out 10 lines of code that should be possible in just 3 lol
« Last Edit: October 26, 2007, 09:46:48 am by Mamoruanime »
Logged
Re: Which Language; C++ or C#?
« Reply #14 on: October 26, 2007, 05:33:18 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
Quote
C, C++ and C# are all able to do the same things, i.e. there's nothing you can't do in C that you can do in C++ or C# or vice-versa. What changes is the way the code is typed and the efficiency of the program created.
Goner have to correct you there. There are quite a few variations on what you can do, manual memory management for example :P.

Couldn't you just make a class to handle that? (or if need be, subclass an existing class o.0) I'm sure theres ways around it; thats one of the joys of C# (and most of .net, for that matter o.0)

I personally prefer C#. Mainly because its far less difficult to use and not quite as bulky as C++ is. I hate the idea of coding out 10 lines of code that should be possible in just 3 lol

I was refering to the fact that its not part of the language standard. Of course there are hackish methods around it, like importing memory allocation functiosn from the kernal libraries. But thats normally true for all languages so it bad to compare languages on non-standard functions and constructs.
Logged
Re: Which Language; C++ or C#?
« Reply #15 on: October 27, 2007, 11:55:10 pm »
  • MetalRidley was here
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 235
manual memory management for example :P.
<.< ... You can't do that in C#? How come......
I think it's because the (main) point of C# is that it's a managed language, which means memory management is done automatically to simplify things.

I'm making my 4 Elements entry in C#, mainly because I wanted to try out XNA. I don't really have a preference for either C# or C++; I usually just use C++ for game development type things and C# for editors or whatever (because the Windows Forms editor mostly :P) since it's usually a little easier and faster.
Logged



THE MUSIC IS REVERSIBLE, BUT TIME IS NOT. TURN BACK... turn back... turn back...

cpprograms

Banned
Re: Which Language; C++ or C#?
« Reply #16 on: October 28, 2007, 12:18:12 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 429
I'd say go with C# nowadays. Before this year started I'd say C++, but I've been using it in college and it's really a more fun language to program. It's much easier to get into IMO, and it's pretty powerful. It *is* true that it requires the .NET framework.. but that's getting to be very common, many, many recent programs require it so far as windows go.

And to those of you saying it's not cross platform compatible, do some damn research before you say that. Look into the MONO project: http://www.mono-project.com. An extra step or two? Yes. But I bet it's not much more complicated than changing all your code to deal with differences between a windows/linux operating environment, especially with non-console apps.

Overall I'd say C#... it's easy to use with the console in comparison... and now that I'm looking at GUI, MS really does have something impressive built for those of us on the programming end... Especially for windows GUI programs... It's so easy to use a dialog and everything else nowadays... my first day windows programming in 3 hours I managed to get two different fully functional programs working... including a simplistic paint application.

... :D
Logged
  • cpprograms
Re: Which Language; C++ and C#?
« Reply #17 on: October 29, 2007, 02:19:20 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 26
score for cpp!

C# is a fantastic language. the great thing about Microsoft is they provide a lot of developer tools this just work. I have the privilege of owning a copy of Visual Studio 2005 and it makes working with C# a breeze.

C# works wonderfully because Microsoft has gone the "don't reinvent the wheel" route. this allows us to develop powerful applications quicker, with no fussing with complex GUI code.

this said, I think you should learn C++ before C#. the wheel may have been invented already, but it is important to know how and why it works. Knowing where you came from is just as important as knowing where you are going.

Lastly, in forgetting in a language you should never aim to master it. Start off with the basics, see what you can do with those, and then dig a little further. if you think you understand how programming works, move on to C#.
« Last Edit: October 31, 2007, 05:34:27 pm by inverder »
Logged
Re: Which Language; C++ or C#?
« Reply #18 on: October 30, 2007, 06:42:40 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 256
I agree with a lot of the points raised in this thread.

I'm fairly comfortable with C++ and C#, and use them both on a common basis, and I love them both for different reasons.

First and foremost, I wasn't a C programmer before I started C++. My programming knowledge lies mainly in C++ and C#, so I can't vouch for C, however, I am familiar with benefits of using such a powerful, fast language. I'm just not a fan of the C style of programming. ( The C-Style Windows SDK or a little file input output is the closest thing I want to get to C, honestly.) The reason my weapon of choice is C++, however is simple: Objects. C++ gives you a lot of the speed of C, but with the addition of objects, and as this was the first language I dove into, my mind works nicely with objects, which makes the layout and design of applications much more manageable that would be without.

A few months after I began learning C++, I started toying with C#. Having done a little Windows Application Development with C++ and the windows 6 sdk, C# was a breath of fresh air. (Especially with the visual studio style of laying out the application.) I quickly decided that trying to manually draw all of the different things I'd want in a simple app, there was no purpose to do Forms development in C++ (Excluding managed C++), therefore any forms apps I create these days, I do so using C# and the .NET framework. Further, learning C# was just like getting a little extension of my C++ knowledge. Much of the syntax and flow is similar, so it makes learning it quick and easy for existing C++ programmers.

A quick thing about .NET: Though people criticize it because perhaps it isn't the fastest or sleekest, the layout and plethora of functionality it brings to windows apps is unparalleled in any other SDK.
Logged
  • My Myspace?

Antidote

>.>
Re: Which Language; C++ or C#?
« Reply #19 on: November 01, 2007, 02:30:45 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
C++ is harder to learn but much easier to create games from scratch because you do alot your self and you know what it's doing. IMHO C# only has Garbage collection on it side (I used C# for a long while and i'm now switching back to C++)
Logged
  • Axiomatic Data Laboratories
Pages: [1] 2   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.128 seconds with 74 queries.

anything