When looking at the history of C#, I found out that C# was seen as an update to C and/or C++. This came a bit as a surprise to me, as on the surface, I see much more common ideas between C# and Java (Garbage collection comes to mind). I don't write code in Java, but I have usually no problem following Java code, and routinely read books about patterns in Java that I can readily transpose in C#, and can honestly not say the same about C++.
So my question is, how is C# closer to C++ than to Java? Is this simply a refusal to acknowledge Java, or am I missing or misunderstanding something?
C is a high-level and general-purpose programming language that is ideal for developing firmware or portable applications. Originally intended for writing system software, C was developed at Bell Labs by Dennis Ritchie for the Unix Operating System in the early 1970s.
" " C is a computer programming language. That means that you can use C to create lists of instructions for a computer to follow. C is one of thousands of programming languages currently in use.
C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...
C is an imperative procedural language supporting structured programming, lexical variable scope, and recursion, with a static type system. It was designed to be compiled to provide low-level access to memory and language constructs that map efficiently to machine instructions, all with minimal runtime support.
Its name starts with the letter C.
IMO, the idea that C# is inspired more from C++ than Java is marketing only; an attempt to bring die-hard C++ programmers into the managed world in a way that Java was never able to do. C# is derived from Java primarily; anyone who looks at the history, particularly the Java VM wars of the mid 90s between Sun and Microsoft, can see that Java is the primary parent.
The syntax of C# is closer to C++ in only certain areas: pointer manipulation (which Java doesn't have), derivation declaration (i.e. public class Foo : Bar, IBaz
rather than public class Foo extends Bar implements IBaz
), and operator overloading.
Everything else is either just like Java (static main declared in a class declaration, no header files, single inheritance, many others), just like both Java and C++ (basic syntax), or uniquely C# (properties, delegates, many many others).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With