• Which language should I learn?
    52 replies, posted
At the moment I only know Lua, which I am quite good at but because of it's limitations with it only being usable within an engine I Would like to learn a different language that has stand alone libraries so that I can make programs. I am not sure which language, I was thinking about C++ and C#, can anyone explain the differences or the advantages / disadvantages of them as I would like to choose the language which will meet my needs before spending time learning it. I just want something which I can make programs with that doesn't have to be attatched to an engine like GMOD, so that I can make basic programs :). Thanks
C++ and C# are always good choices. C++ is more portable and ages old so you'll most likely find a libstdc++ for every platform imaginable, whereas C# only runs on a few platforms (x86 and x86_64, I think). C# is generally considered easier and more productive, and C++ more powerful when used correctly. Personally I prefer C++
Lua is not only usable within an engine. Lua has stand-alone libraries (including the standard library) and frameworks for making programs like applications (which includes games).
[QUOTE=jA_cOp;23898392]Lua is not only usable within an engine. Lua has stand-alone libraries (including the standard library) and frameworks for making programs like applications (which includes games).[/QUOTE] So if LÖVE is an engine, what libs are there for lua for stuff like that? ...Wait, Lua has SDL bindings, doesn't it?
[QUOTE=esalaka;23898596]So if LÖVE is an engine, what libs are there for lua for stuff like that?[/QUOTE] I've never used LÖVE, but I would probably classify it a framework as opposed to an engine. In the end it depends on your definition of those two, though. [QUOTE=esalaka;23898596]...Wait, Lua has SDL bindings, doesn't it?[/QUOTE] Yes. I also have some basic SFML bindings, but they're not very complete. There should be other people out there who have had the same idea.
Brainfuck. Because it is cool and better than anything else.
[QUOTE=onforty;23920389]Brainfuck. Because it is cool and better than anything else.[/QUOTE] But you can't do shit with it!
Choosing a programming language is very much a matter of personal preference and very dependent on the specific application. That being said, I would recommend Python as a good general-purpose language. It's very easy to work with and has a large standard library ("batteries included" was its slogan for a long time). It is popular with Google and NASA, just to name a few. I would also very highly recommend learning C at some point in the near future. Many people say that C is just a subset of C++. Don't be fooled, this is not the case. It is a very different language and requires a very different approach to a given problem. C forces you to understand what's going on in the computer at a fundamental level. Even if it doesn't become one of your main languages, using it for a significant amount of time will make you a better programmer. It also excels in some areas where other languages fall short. It is supported by more hardware platforms than any other, and libraries written in C are more portable than libraries written in C++ or another language. It is great for low-level work because you can easily predict how the compiler is going to turn your C code into machine instructions.
[QUOTE=ROBO_DONUT;23923907]Many people say that C is just a subset of C++. Don't be fooled, this is not the case. It is a very different language and requires a very different approach to a given problem.[/QUOTE] This is of course true, but nowadays it seems to be more about how C++ is not a superset of C.
russian
I'd go for C# it's what I started programming with, and is less complicated than C++. You can do all sorts of wonderful things with it as well.
[QUOTE=UberMouse;23934736]I'd go for C# it's what I started programming with and is less complicated than C++ you can do all sorts of wonderful things with it as well.[/QUOTE] Punctuation would be nice
[quote=turb_;23934990]punctuation would be nice[/quote] lmfao. [editline]01:48PM[/editline] You forgot a period :)
[QUOTE=turb_;23934990]Punctuation would be nice[/QUOTE] Is that better?
[QUOTE=TommieBoy;23937293]lmfao. [editline]01:48PM[/editline] You forgot a period :)[/QUOTE] Thats_the_joke.jpg [editline]11:40AM[/editline] And yeah, learn C#.
I've tried C#, C++, Java, and python, and from a beginner's view I prefer C# because it is easier to code and is still powerful enough to get stuff done
I started out with C++ as my first programming language last year and I love it. I actually find it easier than C# for some reason.
[QUOTE=onforty;23920389]Brainfuck. Because it is cool and better than anything else.[/QUOTE] It's a complete gimmick.
I really like Ruby but I'll probably be burnt at the stake for mentioning it here.
Once you get an OO language down switching between them is easy
[QUOTE=jlj1;24178023]Once you get an OO language down switching between them is easy[/QUOTE] OO language?
Object Oriented
[QUOTE=DividesByZero;24177861]I really like Ruby but I'll probably be burnt at the stake for mentioning it here.[/QUOTE] I don't see why. This isn't the Web Development forum :) I think Ruby is great for both learning and production code.
[QUOTE=esalaka;23898390]C++ and C# are always good choices. C++ is more portable and ages old so you'll most likely find a libstdc++ for every platform imaginable, whereas C# only runs on a few platforms (x86 and x86_64, I think). C# is generally considered easier and more productive, and C++ more powerful when used correctly. Personally I prefer C++[/QUOTE] C# is a lot more portable than C++, you can run .NET assemblies without modification on quite a lot of platforms. In power it doesn't differ too much either, with AOT there's hardly a performance difference.
[QUOTE=arienh4;24288880]C# is a lot more portable than C++, you can run .NET assemblies without modification on quite a lot of platforms. In power it doesn't differ too much either, with AOT there's hardly a performance difference.[/QUOTE] Portable != Multi-platform The C++ Standard Library makes less assumptions about the platform than .NET. Not sure about the language themselves, but I'd think that C++ also requires less stuff than C#. Power != Execution-speed Power basically means how much stuff you can do. The more low-level (or the ability to write low-level code) the more power you have, generally speaking.
[QUOTE=ZeekyHBomb;24289175]Portable != Multi-platform The C++ Standard Library makes less assumptions about the platform than .NET. Not sure about the language themselves, but I'd think that C++ also requires less stuff than C#. Power != Execution-speed Power basically means how much stuff you can do. The more low-level (or the ability to write low-level code) the more power you have, generally speaking.[/QUOTE] It's possible to create stand-alone executables using C# (look at Mono bundles for example). The power thing is mostly true, but it is always possible to extend it with C++.
It won't run on more platforms just because you can compile it to native code ;) You can put C++ into C#? Or did you mean something else?
Last time I checked Mono was always way behind Microsoft's .NET implementation, making it effectively useless. I would guess that this is likely Microsoft's fault in some way (it always is, they like to make "standards" in name only for the purpose of sabotaging interoperability), but the bottom line is that you won't be able to port applications unless you build for the least common denominator (Mono) from the start. Maybe this info is outdated, I've never written a line of C# in my life so this information is entirely the result of my attempts at running C#/.NET applications in Linux and/or WINE. IMHO, more effort than it's worth. Use C# if you don't ever plan on porting to other platforms/OSes. Otherwise, choose a better language for the job.
[QUOTE=ZeekyHBomb;24290101]It won't run on more platforms just because you can compile it to native code ;) You can put C++ into C#? Or did you mean something else?[/QUOTE] You can dynamically link to C++ code in C#. I know it doesn't, by the way, I was referring to "but I'd think that C++ also requires less stuff than C#". [QUOTE=ROBO_DONUT;24290112]Last time I checked Mono was always way behind Microsoft's .NET implementation, making it effectively useless. I would guess that this is likely Microsoft's fault in some way (it always is, they like to make "standards" in name only for the purpose of sabotaging interoperability), but the bottom line is that you won't be able to port applications unless you build for the least common denominator (Mono) from the start. Maybe this info is outdated, I've never written a line of C# in my life so this information is entirely the result of my attempts at running C#/.NET applications in Linux and/or WINE. IMHO, more effort than it's worth. Use C# if you don't ever plan on porting to other platforms/OSes. Otherwise, choose a better language for the job.[/QUOTE] It is on-par with .NET 4 right now, except W(P)F. See [url=http://mono-project.com/Compatibility]Compatibility[/url]. I've often ran code that was only meant to run on Windows .NET in Mono without any issues. It only gets tricky when it links to native code.
[QUOTE=arienh4;24290392]You can dynamically link to C++ code in C#. I know it doesn't, by the way, I was referring to "but I'd think that C++ also requires less stuff than C#".[/QUOTE] What I meant by that is that C++ requires less 'help' from the OS that C# does. But like I said, I don't know if that is true for the languages without their standard libraries. [QUOTE=arienh4;24290392]It is on-par with .NET 4 right now, except W(P)F. See [url=http://mono-project.com/Compatibility]Compatibility[/url]. I've often ran code that was only meant to run on Windows .NET in Mono without any issues. It only gets tricky when it links to native code.[/QUOTE] You also need to make sure to use stuff like System.Environment.EndLine and System.IO.Path.PathSeperator, but even if you run into issues with that, these are easily debugged and fixed. I did get a rather weird crash on OSX with a Windows.Forms app though, which ran fine on Windows and Linux. Gtk# didn't really appeal to me, as it seemed to require more work and I was just after a quick and simple GUI.
Sorry, you need to Log In to post a reply to this thread.