But, From MY opinion, C++ is easier then C# in some things.
For an example:
To request input from user in C++, you do:
cin >> name;
At C#:
string = Console.Readline(name);
(If I'm not mistaking)
|
Edit ninjaed by Helios on this point.
I think this is a bad example. In this case, the C# code is objectively much easier to understand.
First, from a high level perspective, the C++ code is not self documenting. The C# code can be understood by someone with no prior knowledge of the language just by reading it, because it says what it does. This cannot be said of the C++ code in this example.
Second, the C# code uses a simple unambiguous function call, while the C++ code uses the ">>" operator, which brings in a whole lot of issues related to understanding it. For example it brings in the issue of streams which are complicated. It also is an operator used in different contexts, which could cause some confusion. In addition, it can be overloaded so that it doesn't do at all what you would suspect. In some legacy code, I had to work with, I found an instance where the << operator was overloaded for a struct, to do nothing but modify the state of the struct in some strange way, it's use was for pure side effect.
It might be easier for you to learn c++ and for someone else to learn c#. it is just an opinion, not able to be proven. |
Sure, a robust logical proof that C++ is more difficult to learn may not be possible, but the same could be said about a whole lot of things. It certainly might be possible to objectively compare their difficulties in some ways, or to do some study about how easy they are to learn in general. Sure it may depend on the person, but that is just a speculation.
I'm not even going to respond to this. it makes no sense |
I think that what Sleicreider said in that paragraph did make sense.