Jump to content

C# : The Future?


hav0k

Recommended Posts

I am starting to get very confused. I started learning C++ and got ok with some simple stuff. And then I was talking to a friend and he said that I was wasting my time with C++ and that the future was in C#. So I did some research and C# does seem pretty good. But C++ is the standard now and more indepth and more for game programming. I would like some advice on what you guys think I should do.

Link to comment
Share on other sites

Learning any programming language is never a waste of time.

 

The logic and algorithms that you learn can be quickly adapted to different programming languages.

 

C# seems good for rapid application development, but I think it still limited in it's capabilities compared to C/C++.

Link to comment
Share on other sites

#inlcude<iostream>

 

using namespace std;

 

int main()

{

char choice;

 

cout<<"Do you want to use a REAL man's programming language?"<<endl;

cin>>choice;

 

while((choice != 'Y') || (choice != 'y'))

{

cout<<"C# is teh crapz0r n00b!"<<endl;

cout<<"Don't be a dirty hax0r!<<endl;

cin>>choice;

}

 

if((choice == 'Y') || (choice == 'y'))

{

for(int count=0; count<3; count++)

{

cout<<"OMG \t";

}

 

cout<<"\n";

cout<<"C++ r0x0r teh b0x0r!"<<endl;

}

 

return 0;

}

manthing2.jpg
Link to comment
Share on other sites

cout

You need to work on your quotation marks a bit. If I were your compiler, I would throw insults at you ;)

 

This is still the most impressive piece of programming I've ever seen:

 

http://users.ox.ac.uk/~uzdm0006/scans/1kchess/

 

A chess game in 1kb

“He who joyfully marches to music in rank and file has already earned my contempt. He has been given a large brain by mistake, since for him the spinal cord would surely suffice.” - Albert Einstein

Link to comment
Share on other sites

I am starting to get very confused. I started learning C++ and got ok with some simple stuff. And then I was talking to a friend and he said that I was wasting my time with C++ and that the future was in C#. So I did some research and C# does seem pretty good. But C++ is the standard now and more indepth and more for game programming. I would like some advice on what you guys think I should do.

 

C# is basically Microsoft's wannabe "JavaKiller". It is the flagship language for their .NET technology. .NET technology is, ironically enough, all about making your choice of language irrelevant and all about selling object instantiations as web services, etc.

 

C# is some beautiful, clean code. It looks like a mix between Java and Pascal (which, when you think about it, is exactly what it is).

 

However, I doubt it is being used much for game programming. C++ is considered the powerhouse for just about any kind of compiled, stand-alone program. This is because C++ allows for many "unsafe" features (such as doing your own memory management) that can make a difference in performance if you know what you are doing.

Link to comment
Share on other sites

I've heard it was possible to use DirectX with C#. Since this language handles memory management itself, I think there will be more and more programers (even game programers) who will not want to bore themselves with memory management and such things to concentrate on the actual problems.

I think such languages will be more and more used even to make games in a long term point of view.

Link to comment
Share on other sites

#inlcude<iostream>

 

using namespace std;

 

int main()

{

char choice;

 

cout<<"Do you want to use a REAL man's programming language?"<<endl;

cin>>choice;

 

while((choice != 'Y') || (choice != 'y'))

  {

  cout<<"C# is teh crapz0r n00b!"<<endl;

  cout<<"Don't be a dirty hax0r!<<endl;

  cin>>choice;

  }

 

if((choice == 'Y') || (choice == 'y'))

  {

  for(int count=0; count<3; count++)

    {

      cout<<"OMG \t";

    }

 

  cout<<"\n";

  cout<<"C++ r0x0r teh b0x0r!"<<endl;

  }

 

return 0;

}

 

:(

 

I see a few errors, and when I ran that program (with a few extra directories added), the computer screen almost got me in trouble...

 

Wouldn't a string make more sense for an answer? If some computer walked up and asked me that (don't say it!), I would give it a complete answer, and not just one letter. It would also make the logic more fun, and it wouldn't constrict the answer to just Y, because they may be Spanish. :p

 

Or, you could just stick with 'y' || 'Y'

Geekified Star Wars Geek

 

Heart of the Force, Arm of the Force

 

"Only a Sith deals in absolutes!"

-Obi-wan to Anakin (NOT advocating Grey-Jedidom)

 

"The Force doesn't control people, Kreia controls people."

Link to comment
Share on other sites

Hum Java is fine to do this work too. What I was ever told seems to be right : C# really seems to be a MS branded and ehanced version of Java.

 

right. the "JavaKiller" is not so much C# as it is the .NET Framework. Java is both a language and a technology. MS decided to divide the underlying technology from the language, thus making the language choice almost irrelevant (you can even use languages like COBOL in the .NET Framework).

 

C#.NET is no more powerful than VB.NET but it is very Java-like in appearance and is probably meant to help steal some of the Java devs out there.

Link to comment
Share on other sites

C#, Java are primarily for business software.

If you want to go in game development C++ is the best choice.

It is already mentioned that the concepts from one (imperative) language is easily transfered to another one. Also try to learn about programming theory (especially data structures and common algorithms) in general, it will prevent you from reinventing the wheel and save a lot of time.

Link to comment
Share on other sites

C#, Java are primarily for business software.

If you want to go in game development C++ is the best choice.

It is already mentioned that the concepts from one (imperative) language is easily transfered to another one. Also try to learn about programming theory (especially data structures and common algorithms) in general, it will prevent you from reinventing the wheel and save a lot of time.

 

I would generally agree with that.

 

I would also point out that Pascal was designed to teach people how to program. It is a very "clean" language. Delphi is object-oriented Pascal. Spending some time fooling about with Pascal/Delphi might be a good idea (although not absolutely necessary).

 

I would definitely think that the use of object-oriented programming is essential to good game programming. Don't just put a bunch of procedural code in your objects....use objects the way objects are meant to be used.

 

To that end, Java and/or C# would be good (as a learning tool) as they are fully object-oriented.

Link to comment
Share on other sites

I am starting to get very confused. I started learning C++ and got ok with some simple stuff. And then I was talking to a friend and he said that I was wasting my time with C++ and that the future was in C#. So I did some research and C# does seem pretty good. But C++ is the standard now and more indepth and more for game programming. I would like some advice on what you guys think I should do.

 

I also want to add that there are other fields where C/C++ is preferred, if not used exclusively. This is especially true in the engineering fields. If you go with C# only, you pretty much limit yourself to the business programming with Microsoft.

 

Another thing is, it will be easy for you to pick up C# if you already know C++ but the reverse is not always true.

Link to comment
Share on other sites

Developing games in Lisp for teh win :-"

 

Seriously though, it's best not to worry about language choice, since the underlying foundations are more or less the same. It is true that knowledge of a language can only help you, but ideally a good programmer should be able to pick up a language in a week or two. Programming is less about learning the language than it is about developing a structured way of approaching problems. The ace programmers differ from the average ones not by how familiar they are with C++ syntax, but by how much more effectively they can formulate pseudo-code solutions to the problem because once you have the underlying pseudo-code, transferring that code to any language is simply grunt work.

There are doors

Link to comment
Share on other sites

I prefer to use java. I know that c# is suppostly an "open" standard, yet, i really don't trust microsoft. So no C#. And really they are almost equivalent.

 

For the detractors of java/C# : the main speed bump in realation with c and friends, is the startup of the virtual machine (which is a memory hog). So obviously this languages are not really appropriate now for software that starts/ends relatively frequently (ex: a desktop OS), but really nice for software that runs for a long time (ex: a server), since there are no memory leaks (as the definition of memory leak). If some games were coded in such a languages many problems would dissapear. Vampire stuttering ? Gone. AoW2 crash ? Gone. etc. As memory speed increases, improments to the VM, and other things, the difference bettwen c and a VM will be insignificant in all but the most real-time critical application (that i don't consider games to be).

It's nicer for programming.

Link to comment
Share on other sites

And for the record, J# is MS's "JavaKiller".

 

Yes, that was their first attempt at such...until they seperated the technology from the language in .NET. As I said, it is really the .NET Framework, more than C#, that is the JavaKiller.

 

CLARIFICATION: I thought you meant J++ not J#....sorry about that. Anyway, I think C# is supposed to be the "spiritual" successor to Java even if it is not the actual Java Dev stealer, as it were.

Edited by Plano Skywalker
Link to comment
Share on other sites

What everyone else has said. Plus:

 

- C# is proprietary Micro$oft. It is basically (Sun) Java. And Java is basically C++ without pointers.

- .NET is not a complete suite of anything as yet. It is a MS marketing initiative. (They even had a .NET version of Office, until it was pulled on acount of "WTF?".)

- C++ is universal. Windows DLLs are C++. The default, shipped language compiled with Unix is C++.

- Read the Gang of Four: "Design Patterns" is the definitive work on OOP (the GoF is: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides: any literature written by these people is highly recommended).

OBSCVRVM PER OBSCVRIVS ET IGNOTVM PER IGNOTIVS

ingsoc.gif

OPVS ARTIFICEM PROBAT

Link to comment
Share on other sites

- C# is proprietary Micro$oft. It is basically (Sun) Java. And Java is basically C++ without pointers.

Java and C++ are completely different:

- C++ is a language, Java is a technology

- Even as languages they are quite different

- C++ compiled code is native to (and hence tied to) operating system and architecture, Java compiled code is only executed on JVM.

 

- C++ is universal. Windows DLLs are C++.

Windows DLLs are compiled :D. They are not "C++". Most of them however (as most of Windows code) were written in C.

I suppose you mean that Windows development tools come with libraries and C headers (which is needed only for low-level or system programming)

 

The default, shipped language compiled with Unix is C++.

The default compiler (I think you meant that) that comes with many Unix operating sytems is C compiler. Fore example in GCC, C is main and C++ is optional component.

And it is library headers and not compiler that can be described as using some language.

In case of Unix (GNU/Linux to be exact), compilers are GCC , and libraries are GLibC. In case of Windows they are shipped together with MS Visual Studio.

Link to comment
Share on other sites

- C# is proprietary Micro$oft. It is basically (Sun) Java. And Java is basically C++ without pointers.

Java and C++ are completely different:

- C++ is a language, Java is a technology

- Even as languages they are quite different

- C++ compiled code is native to (and hence tied to) operating system and architecture, Java compiled code is only executed on JVM.

And your point is? They are actually very very similar languages. The original poster was asking what languages are the future. You are nit picking obscure differences that make no significant impact on the languages. Java needs a Java Virtual Machine to run. So? How is that different from an uncompiled C code needing a compiler to run?

 

To make the point, I am sure the environment is not something the programmer is going to have to create: it will be a matter of adapting one's programming skills to whatever project one is asked to do.

 

So, C, C++, C# and Java are all the same family. They are as close as they can be to identical; except most programmers have a large problem with pointers, so Sun removed all mention of them in Java (allegedly).

- C++ is universal. Windows DLLs are C++.

Windows DLLs are compiled :D. They are not "C++". Most of them however (as most of Windows code) were written in C.

I suppose you mean that Windows development tools come with libraries and C headers (which is needed only for low-level or system programming)

C/C++, whatever. C++ is a superset of C, with Classes. Java is just ++C-- (add classes to C, take away pointers).

The default, shipped language compiled with Unix is C++.

The default compiler (I think you meant that) that comes with many Unix operating sytems is C compiler. Fore example in GCC, C is main and C++ is optional component.

And it is library headers and not compiler that can be described as using some language.

In case of Unix (GNU/Linux to be exact), compilers are GCC , and libraries are GLibC. In case of Windows they are shipped together with MS Visual Studio.

I still don't know why you are posting this, except to point out your own grasp of programming language trivia. I'm surpirsed you didn't go into the gazillion different flavours of Unix, too. :rolleyes:

 

BASIC, now almost fifty years old, is still being used. It has been adapted into JavaScript, too, for instance, as well as innumerable adaptations into various proprietary scripting languages.

 

I also note that CoBOL (COmmon Business Oriented Language) is still implemented on huge legacy systems, and because there are very few CoBOL programmers, the demand is high, but I would never wish that language on anyone (ugh! position-sensitive semantics).

 

The point I was making, since you seemed to miss it, is that learning C is a good thing, because it will provide an entry point inot all the programming in demand (like Java 2 Enterprise Edition).

 

Don't forget to read some of the texts by the Gang of Four.

OBSCVRVM PER OBSCVRIVS ET IGNOTVM PER IGNOTIVS

ingsoc.gif

OPVS ARTIFICEM PROBAT

Link to comment
Share on other sites

And your point is? They are actually very very similar languages. The original poster was asking what languages are the future. You are nit picking obscure differences that make no significant impact on the languages. Java needs a Java Virtual Machine to run. So? How is that different from an uncompiled C code needing a compiler to run?

 

To make the point, I am sure the environment is not something the programmer is going to have to create: it will be a matter of adapting one's programming skills to whatever project one is asked to do.

Their syntax may look the same, but their structure, organisation and philosophies are fundamentally different. These differencies must be understood by the programmer in order to see the impact of language (and hence program environment) choice on final product. How good is the programmer who does not know what is the difference between Java byte code and compiled C++ code?

 

But that's my opinion, I'm not forcing you to agree.

 

C/C++, whatever. C++ is a superset of C, with Classes. Java is just ++C-- (add classes to C, take away pointers).

Thank for helpful references >_<, but the fact that C is a subset of C++ was exactly my point. Yes you still can use any of the systems calls in Windows, which are in C, but there is no object-oriented structures in WinAPI headers, hence I considered "Windows DLL are C++" to be misleading. :)

 

I still don't know why you are posting this, except to point out your own grasp of programming language trivia. I'm surpirsed you didn't go into the gazillion different flavours of Unix, too. :)

It would be helpful for people, who didn't know that. I suppose, those who read these thread are certainly interested in programming topics, and precise and relevant information is always helpful.

 

Don't forget to read some of the texts by the Gang of Four.

I certainly will. Seriously. ;)

Link to comment
Share on other sites

[snip some pedantic meanderings on the difference between C, C++ and Java]
Don't forget to read some of the texts by the Gang of Four.

I certainly will. Seriously. >_<

I not meaning to be condescending -- if that's what it appears -- I was actually recommending the references for the original poster; I expected anyone who was programming in C to have encountered them (especially "Design Patterns") before. Still, it does us all good to get the whinney from the horse's mouth.

OBSCVRVM PER OBSCVRIVS ET IGNOTVM PER IGNOTIVS

ingsoc.gif

OPVS ARTIFICEM PROBAT

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...