1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Is C# the best language to learn right now?

Discussion in 'Hardware, Software & Troubleshooting' started by WedgeBob, Sep 30, 2010.

  1. WedgeBob

    WedgeBob XSI Mod Tool User

    Joined:
    Nov 12, 2008
    Messages:
    617
    Likes Received:
    4
    I'm curious about this, because I've been on a long hiatus from programming since maybe 2003 or so since I last coded. The last language I used was Visual Basic 6 of all things, and this was pre-.Net. However, with all languages tying in to the .Net infrastructure, it almost seems like VB's a dying language now. I did tackle some C++ for DOS development back in the day, however, but...in terms of modern day Windows development, I'm wondering if C# is really the language to go with. Anyone else use this? I was considering pulling the trigger on the XNA Xtreme 101 bundle from 3D Buzz, and wondering if I really should consider this over C++. I'm still on the fence about which language to get back into.
     
  2. Sir_Brizz

    Sir_Brizz Administrator Staff Member

    Joined:
    Feb 3, 2000
    Messages:
    25,995
    Likes Received:
    75
    If you're into game programming, C++ is still going to be the way to go (unless you decide to build some things in UDK or similar engine). C# is by no means a bad language, but you aren't going to be building awesome looking and playing games on there.
     
  3. WedgeBob

    WedgeBob XSI Mod Tool User

    Joined:
    Nov 12, 2008
    Messages:
    617
    Likes Received:
    4
    Ahh, okay, I thought that because of XNA and everything that C# was starting to become a good platform for games and what not. Okay, thanks for the clarification.
    Although, I'm pretty sure that since VS 2010 Express is free to download, might as well pick up both, and perhaps visit my library for a few books on both languages individually.
    Probably could switch off between C++ and C# depending on what type of game or application programming I'm looking into.
     
    Last edited: Oct 1, 2010
  4. ambershee

    ambershee Nimbusfish Rawks

    Joined:
    Apr 18, 2006
    Messages:
    4,519
    Likes Received:
    7
    The trouble with C# is that it's very platform dependant - but if you specifically want to program for that platform then go for it.

    As it happens, learning basic object orientated fundamentals and games programming in C# first can be a pretty good primer for working in C++ and Java (or Unreal..)
     
  5. WedgeBob

    WedgeBob XSI Mod Tool User

    Joined:
    Nov 12, 2008
    Messages:
    617
    Likes Received:
    4
    Okay, thanks. I mean, I did download the whole VS 2010 Express ISO package, so I have all the languages handy just in case.

    Although I've been dealing with Visual Basic since 1996 (Version 4.0 days), I think it's about time I put VB on the back burner and go for a REAL programming language.
     
    Last edited: Oct 1, 2010
  6. MeStinkBAD

    MeStinkBAD Lurking where you least suspect...

    Joined:
    Dec 26, 2000
    Messages:
    223
    Likes Received:
    0
    .NET is basically the same concept as Visual Basic. It's platform/compiler dependent. And honestly .NET really puts the end user thru hell. People don't enjoy having to download 100MBs of runtimes just to run one small program.

    I've given up on Visual Studio... I really don't like the 2010's IDE interface. And it doesn't support ANSI-C out of the box either.
     
  7. WedgeBob

    WedgeBob XSI Mod Tool User

    Joined:
    Nov 12, 2008
    Messages:
    617
    Likes Received:
    4
    Well, I notice that C# is like a glorified Java-style language that was supposedly claimed to bring the best of VB.NET and C++ and jam-pack it into its own language, I believe that was Microsoft's idea. However, as much as I do like C#, I'm starting to think that there's a lot of changes to go through to learn XNA 4.0, as well as .Net 4.0 in general. I've been looking through 3D Buzz's tutorials on C# over the past few months, and think that even tho it starts out easy, VC# 2010 does introduce changes that I'm gonna have to address down the road.
     
  8. Sir_Brizz

    Sir_Brizz Administrator Staff Member

    Joined:
    Feb 3, 2000
    Messages:
    25,995
    Likes Received:
    75
    C# is more of the best of C++ and Java. There's no VB crap in there. As far as .NET languages go, C# is the bee's knees. But if you want to get in to serious game development you'll have to learn C++ at some point.
     
  9. MeStinkBAD

    MeStinkBAD Lurking where you least suspect...

    Joined:
    Dec 26, 2000
    Messages:
    223
    Likes Received:
    0
    Problem w/ C# is that much of the language is patented by Microsoft. Versions 3 and 4 aren't recognized by the ECMA. Also, like Java an VB it will fade out of use. I mean I'm responding on an iPad. Infinity sword run on the UE3 engine. Impressive game. Honestly it doesn't matter so much what language you learn but what language's aren't restricted to any patents. C, C++ will both work. the prefered language is Objective-C which is open and easy to learn if you know C or C++.

    You restrict yourself by use C#. You never know if Microsoft will require payment to use it. So beware.
     
  10. Sir_Brizz

    Sir_Brizz Administrator Staff Member

    Joined:
    Feb 3, 2000
    Messages:
    25,995
    Likes Received:
    75
    Objective-C is horrible. The only reason anyone should put themselves through that torture is if they are making Apple applications.

    Also, Microsoft has been pretty helpful to the Mono team making C# pretty uniformly cross-platform compatible anywhere Mono works.
     
  11. MrMaddog

    MrMaddog Flak Monkey

    Joined:
    Jul 13, 2002
    Messages:
    543
    Likes Received:
    0
    I'm curious about learning C# myself, due to wanting to play around with XNA Game Studio and also have no qualms with porting stuff to Mono. I already have experience with C/C++ (and Unreal Script of course) so how different is C# to them?
     
  12. Sir_Brizz

    Sir_Brizz Administrator Staff Member

    Joined:
    Feb 3, 2000
    Messages:
    25,995
    Likes Received:
    75
    Not very. Primarily, it just handles most memory management for you, like Java and UnrealScript do. Syntax-wise it is very C.
     
  13. MeStinkBAD

    MeStinkBAD Lurking where you least suspect...

    Joined:
    Dec 26, 2000
    Messages:
    223
    Likes Received:
    0
    .... what's so "horrible" about it? Perhaps you should learn about it first...
     
  14. Sir_Brizz

    Sir_Brizz Administrator Staff Member

    Joined:
    Feb 3, 2000
    Messages:
    25,995
    Likes Received:
    75
    I was going to find all the blog posts by programmers I respect talking about how and why Objective C is so terrible, but it's probably just easier to say... if you've programmed in C++ for a significant amount of time (or any other more modern language at this point), you'll be able to tell why Objective C is so bad.
     
  15. MeStinkBAD

    MeStinkBAD Lurking where you least suspect...

    Joined:
    Dec 26, 2000
    Messages:
    223
    Likes Received:
    0
    Please find all these "blog postings" by programmers about Objective-C being so bad? I would love to see what they say. Please show me...

    Should I show you Carmacks blog? He absolutely loves the development tools for iOS. It's his only interest at the moment it seems.

    Why do you assume that C++ isn't an option? I said the iOS developer kit allows developers to use C, C++, and Objective-C. If you want to use C++ there is nothing stopping you...
     
    Last edited: Dec 14, 2010
  16. Sir_Brizz

    Sir_Brizz Administrator Staff Member

    Joined:
    Feb 3, 2000
    Messages:
    25,995
    Likes Received:
    75
    It really shouldn't surprise you that Carmack doesn't mind Objective-C (never read anything from him saying he actually likes it for any reason). The tools id used internally for the original Doom were written in Objective-C. I don't see how Carmack using a language (that he later abandoned completely for C++ until recently) makes that language good.

    I don't see any good reason to learn Objective C for anything, I'm not sure why you even suggested it. Why not just learn C++? I know that ObjC is not the only option on Apple platforms, but for iOS you at least need ObjC to link the libraries and build the executable and that is far more than enough of it for me.

    I'm not going to bother linking the blogs. You can use Google if you're that interested.
     
  17. MeStinkBAD

    MeStinkBAD Lurking where you least suspect...

    Joined:
    Dec 26, 2000
    Messages:
    223
    Likes Received:
    0

    Ummm.... did you check out Mono's dev blog? http://www.go-mono.com/monologue/ ? Most of it relates to using Mono to mix C# with Objective-C?
     
    Last edited: Dec 15, 2010
  18. Sir_Brizz

    Sir_Brizz Administrator Staff Member

    Joined:
    Feb 3, 2000
    Messages:
    25,995
    Likes Received:
    75
    WTH are you talking about?

    There are like three posts on there that even mention Objective-C. The first is about porting ObjC code to C# in MonoMac. The other two are explaining differences between libraries in ObjC and MonoMac. (Granted this is only back to December 1st, but come on... you CAN'T mix ObjC and C#. Not even in Mono)
     
  19. WedgeBob

    WedgeBob XSI Mod Tool User

    Joined:
    Nov 12, 2008
    Messages:
    617
    Likes Received:
    4
    Heh...all righty then. With that in mind, here's a solid start to console app development in C#, and I am wondering how this would translate to C++ code. I used the 3D Buzz Hyperion Project as something to fall upon to do this, and brought back an old program that brings me back to when I was writing programs on the TI-99/4A, good times:

    Here's the code broke up into different classes for a program called "Sentence Writer" of all things, but just shows the functionality and object-orientation without too much trouble:

    Program.cs - http://pastebin.com/4WCw9cSJ
    StartProgram.cs - http://pastebin.com/5vJF4S2B
    OptionMenu.cs - http://pastebin.com/j4FusJhi
    AboutProgram.cs - http://pastebin.com/u7QJp669
    CreateSentence.cs - http://pastebin.com/yP6Vhsfk
    QuitProgram.cs - http://pastebin.com/hEPcb0V6

    All in all, not bad for using six classes in this program. Everything seems to communicate well with each other, and seems to make use of everything in the code quite solidly. No complaints. So, how would this translate to in C++ if I were to code this same thing there?
     
  20. Sir_Brizz

    Sir_Brizz Administrator Staff Member

    Joined:
    Feb 3, 2000
    Messages:
    25,995
    Likes Received:
    75
    Well, there would be a lot of things you'd have to change, probably. Are you using XNA there? In C++ you'd have to use something like SDL, but it would probably be a good goal for you to try to match that feature-wise and see if you can figure out how to do it.
     

Share This Page