C# compared to C and C++

Realme

Member
Joined
Jul 2, 2019
Messages
19
Programming Experience
Beginner
I am studying php and realize php is unserious compared to C# whereas you get to write outputs with "echo OR printf" even "print_r"

Now when I realized that and looked into C language I realize that C and PHP is more or less the same.

Because of other languages other than C# is more or less similar.

Is it true to state that C# is more difficult as it has its own language and is not as much similar to others?
 

Skydiver

Well-known member
Joined
Apr 6, 2019
Messages
205
Location
Virginia Beach, VA
Programming Experience
10+
Actually, C# was designed to be similar to Java and C++.

Old PHP looks a lot like C because most of its functions are simple wrappers around C functions. More modern PHP is not as C like because it, too, is leaning towards being object oriented.

I suspect that the difficulty you were having with C# was its bend towards being object oriented, while the PHP seems to fit your more imperative style of coding. You'll likely run into the same issues you had with C# once you get into more modern PHP modules with their OO bend.
 
Last edited:

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
2,275
Location
Sydney, Australia
Programming Experience
10+
Difficult is in the eye of the beholder. As suggested, it really depends what style you find more natural as to whether you find a particular language easy or difficult. Moving to a language that is similar but different can also be a blessing a curse. I've seen this many times with people moving from VB6 to VB.NET. It can be easier to move from VB6 to VB.NET rather than C# because VB.NET obviously has many syntax similarities to VB6 but people then also expect things that look the same to act exactly the same too, which is not always the case. Many people get angry at the language for not working the way they think it should instead of learning how it does work and accepting that.
 
Top Bottom