togerland Posted May 8, 2012 Share Posted May 8, 2012 What is easier to learn and does it work on linux? Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/ Share on other sites More sharing options...
0 htcz Posted May 8, 2012 Share Posted May 8, 2012 No seriously, On Linux you have Mono which is pretty good but not 100% polished. C++ does set some important begineers lessons in programming but C# is great :) Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852131 Share on other sites More sharing options...
0 DrakeN2k Posted May 8, 2012 Share Posted May 8, 2012 I would say c# Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852137 Share on other sites More sharing options...
0 Lant Posted May 8, 2012 Share Posted May 8, 2012 My answer would be to say that they are different. They are each better than the other at certain tasks. Regarding ease of use, there is no completion, C# wins hands down here. Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852157 Share on other sites More sharing options...
0 inferniac Posted May 8, 2012 Share Posted May 8, 2012 What is easier to learn and does it work on linux? No C# doesn't work on linux, on windows it's better than c++. Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852165 Share on other sites More sharing options...
0 htcz Posted May 8, 2012 Share Posted May 8, 2012 No C# doesn't work on linux What? http://www.mono-project.com/Main_Page Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852169 Share on other sites More sharing options...
0 +Nik Louch Subscriber² Posted May 8, 2012 Subscriber² Share Posted May 8, 2012 C# is arguably an easier language to get into that C++. A lot of the management is done for you, memory, and so on. However, there is an underlying feeling that C++ is more powerful overall if you want to jump down to the depths (I can't argue either way on this, I make apps that don't require me to go THAT deep). As for Linux, yes - there is MONO, but it's a port, it's not pure C#. HighwayGlider 1 Share Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852171 Share on other sites More sharing options...
0 Slugsie Posted May 8, 2012 Share Posted May 8, 2012 To decide which is better we need to know what you want to use it for. It's a bit like asking which is better, a Ferrari or a Mini van? Each has their uses and pros/cons, and if you make the wrong choice you will find things very difficult. C++ is ultimately more powerful, and allows you much finer grained control. It is essentially the language that most of the big OSs are written in. But for most of us normal programmers their is no need for that level of control, especially when you consider that if you get it wrong things will go disastrously wrong very quickly. C# will be easier to learn, and if nothing else will give you a basic grounding that you can use to move up to C++. ReDFoX2200 and -Himanshu- 2 Share Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852191 Share on other sites More sharing options...
0 Stephen Veteran Posted May 8, 2012 Veteran Share Posted May 8, 2012 C# is arguably an easier language to get into that C++. A lot of the management is done for you, memory, and so on. However, there is an underlying feeling that C++ is more powerful overall if you want to jump down to the depths (I can't argue either way on this, I make apps that don't require me to go THAT deep). As for Linux, yes - there is MONO, but it's a port, it's not pure C#. c# is an open standard, mono is an implementation of that standard as it the .net framework. afaik Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852193 Share on other sites More sharing options...
0 inferniac Posted May 8, 2012 Share Posted May 8, 2012 What? http://www.mono-project.com/Main_Page Didn't knew about that, shame I can't edit my previous post. Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852249 Share on other sites More sharing options...
0 Kami- Posted May 8, 2012 Share Posted May 8, 2012 c# is an open standard, mono is an implementation of that standard as it the .net framework. afaik Correct; each is a framework built on the standard. Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852285 Share on other sites More sharing options...
0 +Majesticmerc MVC Posted May 8, 2012 MVC Share Posted May 8, 2012 Yes, C# is better than C++. It's much more elegant and doesn't have much of the legacy stuff that comes with C++. Whether or not you want to use it as a learning language is more a personal preference thing. I tend to recommend C++ over C# for learning, since it gives you experience with lower level concepts such as pointers, whilst still offering object-oriented goodness, but C# allows you to dive straight in more easily and handles all the lower level stuff for you. C# is supported (as others have said) on Linux through the Mono project, so it's perfectly usable on Linux. You may come into ideology conflicts with Linux users if you create software using it though :) Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852307 Share on other sites More sharing options...
0 spacer Posted May 8, 2012 Share Posted May 8, 2012 Short answer: C# is far easier to learn if you're just starting out. Long Answer: C# is far easier to learn, but you never really have to learn about memory management with C# which is an important part of software development. Though, it's arguably less relevant in C# because it's a managed language. You can always use C# to learn the ropes of object-oriented development, and then go back to focus on memory management in an unmanaged language like C++. C# also has better tools, which can make it significantly less frustrating to develop. You can use Visual Studio for both languages, but C# has syntax highlighting, type-ahead, intellisense, and all other modern features of IDEs built into the language (it's a .NET language after all). C++ has some intellisense, but no highlighting or anything else. For beginners, this might be a huge obstacle. For 99% of anything software developers will ever have to do, C# a good choice. For the other 1%, videogame development, C++ is arguably the better choice. And by "arguably" I mean C++ is only better if you're planning on writing the next Unreal Engine. C# is actually very capable for making small 2D and 3D games. Andre S. 1 Share Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852323 Share on other sites More sharing options...
0 MFH Posted May 8, 2012 Share Posted May 8, 2012 IMHO C++ is better; one of the first and foremost reasons is RAII which lets you manage resource (notice the difference here: GCs only manage memory!, but memory is the least dangerous garbage you may produce in a [modern] system?) in arguably the cleanest way possible - as you don't have to do anything yourself? Another big advantage is that the whole library is developed under strict control in terms of runtime complexity - a feature you'll never be able to find under C? (or Java for that matter)? Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852333 Share on other sites More sharing options...
0 articuno1au Posted May 8, 2012 Share Posted May 8, 2012 What's with all the soft wording :\ C++ is a much more powerful and faster executing language. Depending on the compilers you are using, you can even insert compiler code directly into the app for those processes you want to scream along. C++ runs as native code. It's compiled to be as efficient as possible on which ever platform you run it on. It's far "lower level" and lacks a lot of niceties that higher languages possess (such a Just-in-Time debugging). C# is far FAR faster to deploy in. It is also far more forgiving of mistakes. In the process is being so, it is also far slower. Where as C++ runs code that is compiled directly for the CPU, C# runs as a managed language. You don't have to worry about assigning memory as the CLI handles that for you. You can make small mistakes in your code and have it continue to run. You can't do as much (but it's fairly negligible a difference for the average coder). Personally, given the work I do, I much prefer C#. I enjoy the niceties of the .net framework (this should be what ultimately makes the decision for you). That said, I personally believe that if you want to be a serious coder, you should learn on C++ so you know exactly what C# is handling for you in the background. That way you will realise exactly how much CLI handles and why it's so much slower than C++ for HPC uses. tl;dr - C++ first then C# if you plan to be a serious coder. C# first and no C++ if you don't care. Depicus, +Majesticmerc and theh0g 3 Share Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852349 Share on other sites More sharing options...
0 firey Posted May 8, 2012 Share Posted May 8, 2012 My vote goes to C#. It's still a C Based language so it feels very close to C++ albeit cleaner. The .NET Framework provides most everything you need, anything else can be made using the framework and piecing parts together. I spend 90% of my work day in C# and it is a great experience. Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852381 Share on other sites More sharing options...
0 psreloaded Posted May 8, 2012 Share Posted May 8, 2012 I will side with C# It is easy and powerful. But if you want to learn about pointers, you have to go with C++. Other that that Visual Studio makes programming is C# very pleasant. Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852391 Share on other sites More sharing options...
0 Andre S. Veteran Posted May 8, 2012 Veteran Share Posted May 8, 2012 What is easier to learn?C# and by far.does it work on linux?C++ has gcc and clang for compilers, as well as a few different IDEs, while C# has mono and the monodevelop IDE. Contrarily to some resilient myths, mono is not "unpolished" or "dangerous" or such. It's every bit as polished and alive as any C++ compiler on Linux, and a quality solution used by professionals.there is MONO, but it's a port, it's not pure C#. Mono is an implementation of open standards just like gcc or clang. I don't know what you mean by "pure C#", as Microsoft's .NET itself is written in C++.In the process is being so, it is also far slower. Where as C++ runs code that is compiled directly for the CPU, C# runs as a managed languageC# is also compiled to machine code, it just does so usually "Just-in-time" rather than always ahead of time like C++. While C# does make compromises on performance where C++ makes none, it still offers comparable level of performance in most cases, and saying it's "far slower" is an exaggeration. I'd even say that it's easier to write fast code in C# than C++, leading to faster programs given the same time constraints.Of course if what you're writing is scientific high-performance computing code, then C# isn't what you should be using, but I'm talking about the general case. Another big advantage is that the whole library is developed under strict control in terms of runtime complexity - a feature you'll never be able to find under C?I've heard that from Herb Sutter and it's quite amusing. Yes, most of C++'s library has its complexities documented, but maybe because there isn't much more than containers and algorithms in the C++SL... Containers and algorithms in .NET also have their algorithmic complexities documented, but there is no point documenting the algorithmic complexity of a Printer or Socket class. But if you want to learn about pointers, you have to go with C++. There are pointers in C#. And reference vs value types is basically the same idea as pointers vs values in C/C++. Squirrelington and GreenMartian 2 Share Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852521 Share on other sites More sharing options...
0 aberg Posted May 8, 2012 Share Posted May 8, 2012 C#, the easy way into WPF and Windows Phone. Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852547 Share on other sites More sharing options...
0 LaP Posted May 8, 2012 Share Posted May 8, 2012 It's not like C++ is "hard" like assembly. IMO if someone finds c++ hard to learn then maybe a job in computer tech is not for him/her. Or maybe it explains why so many apps are slow as hell these days. This said c++ is kinda "dead". Last time i saw a job requiring c++ knowledge was a long time ago. Most jobs theses days require .net, java, php, mobile frameworks, etc or old languages like cobol or sas for jobs in banking and inssurance (anyway where i live might be different for california ;). c++ is mostly used for video game engines and by scientist for simulation and such (or in old programs made with it). Basically it's used for things that can stress a computer. And for such jobs usually c++ may be not enough as you need to understand assembly too and need to have a very good knowledge in algorithmic and mathematic (anyway last time i checked there was still some assembly used). If your goal is to learn and become a computer eng then you should start with c++. I would even go as far as to say you should start with assembly. In fact you should start with mathematic as it's the basis of being a computer eng. It's more important to learn the concepts first. Starting with the language is not a good idea. You can learn mathematic and algorithmic and oop concepts without even using a computer. If you goal is to write a simple linux app and you don't care about being a good dev then c# if mono is good (can't say never used mono). It's definately easier. Judo 1 Share Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852549 Share on other sites More sharing options...
0 psreloaded Posted May 8, 2012 Share Posted May 8, 2012 C# is far FAR faster to deploy in. It is also far more forgiving of mistakes. In the process is being so, it is also far slower. Where as C++ runs code that is compiled directly for the CPU, C# runs as a managed language. You don't have to worry about assigning memory as the CLI handles that for you. You can make small mistakes in your code and have it continue to run. You can't do as much (but it's fairly negligible a difference for the average coder). Even C# is compiled to native code. But that is done by the JIT compiler on first run. This is a common myth. Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852899 Share on other sites More sharing options...
0 simplezz Posted May 8, 2012 Share Posted May 8, 2012 What is easier to learn It depends how you look at it. If you already know how to use the OS facilities and third party libraries, then I'd say C++ is generally quicker to learn. By generally, I mean the common stuff, basic OO, commonly used STL classes, etc. And if you already know C, learning C++ is made that much easier. With C# you'll need to learn both the language and the dotnet library. In terms of difficulty, it's probably on about the same level as Java. After all C# was Microsoft's answer to growing Java use. and does it work on linux? I wouldn't recommend using C# or dotnet outside of Windows. Its support is sketchy at best, and most Linux distributions are blacklisting it (Mono) due to precarious licensing issues. Furthermore, the proprietary Windows Forms also won't be available outside of Windows, so if you intend on writing a GUI application, you will have to use something else. If you want to run your code on GNU/Linux or support multiple platforms, C++ is the better option. It's well supported across every major platform, and there are free open source tools aplenty to aid in development. You can even write a Windows C++ application inside of Linux with GCC cross-compilation and Wine for testing. Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852977 Share on other sites More sharing options...
0 zombieChan Posted May 8, 2012 Share Posted May 8, 2012 I will side with C#, it's easier and cleaner(Though I'm also biased because I really hate C++.). Even though .Net itself isn't on Linux(though MS should really think about making .Net multi-platform) mono works fine as well as dotGNU. Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852991 Share on other sites More sharing options...
0 simplezz Posted May 8, 2012 Share Posted May 8, 2012 c# is an open standard, mono is an implementation of that standard as it the .net framework. afaik Actually it's not an open standard because Microsoft controls it and nobody else has input on it. It's a registered standard with EMCA, but that's as far as it goes. It's also patent encumbered, so there's a risk in the future that other implementations could get shutdown. It's best to avoid those headaches. At least C++ is a true open standard. Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594852995 Share on other sites More sharing options...
0 Ambroos Posted May 8, 2012 Share Posted May 8, 2012 I'm surprised nobody has said Java yet. Eclipse is a great free Java IDE, Java and C# are almost the same language, and Java is perfectly cross-platform, including GUI's. I'm studying Applied IT and have been writing Java since september now. I've always used Eclipse with it, but I feel right at home in Visual Studio using C#. No reason to limit yourself to Microsoft with C# right from the beginning. (in fact, C# is strongly 'inspired' on Java. But Java sort of forces you to write cleaner code (in my opinion), which will help you later on) simplezz 1 Share Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594853019 Share on other sites More sharing options...
0 simplezz Posted May 8, 2012 Share Posted May 8, 2012 I'm surprised nobody has said Java yet. Eclipse is a great free Java IDE, Java and C# are almost the same language, and Java is perfectly cross-platform, including GUI's. Given the choice, Java is a better option than C# for cross-platform support. Link to comment https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/#findComment-594853065 Share on other sites More sharing options...
Question
togerland
What is easier to learn and does it work on linux?
Link to comment
https://www.neowin.net/forum/topic/1075753-is-c-better-then-c/Share on other sites
53 answers to this question
Recommended Posts