BioBoost / course-object-oriented-programming-with-cpp

C++ Programming Course for VIVES University of Applied Sciences (Bachelor Degree)
https://evolved-cpp.netlify.app/
8 stars 11 forks source link

Differences C# and C++ #30

Open BioBoost opened 3 years ago

BioBoost commented 3 years ago

https://www.guru99.com/cpp-vs-c-sharp.html

aj-spec commented 3 years ago

https://www.geeksforgeeks.org/c-vs-c-sharp/

muktida02 commented 3 years ago

C# is an object-oriented, high-level programming language. Like Java, C# provides a number of features to make it easier for a developer to code in this language such as type checking, bounds checking, uninitialized variable checking, and garbage collection. While the language does not technically specify how it is executed, C# is most commonly compiled into byte-code (rather than machine code) and executes on a virtual machine (like Java) that converts the application into machine code on the fly. C# provides a managed memory model that adds a higher level of abstraction again. This level of abstraction adds convenience and improves development times, but complicates access to lower level APIs and makes specialized performance requirements problematic. It is certainly possible to implement extremely high performance software in a managed memory environment, but awareness of the implications is essential. The syntax of C# is certainly less demanding (and error prone) than C/C++ and has, for the initiated programmer, a shallower learning curve. C#

Rapid client application development. High performance Server development (Stack Overflow for example) that benefits from the .NET framework. Applications that require the benefits of the .NET framework in the language it was designed for.

C# remains a common choice for internal/enterprise applications but is less common for commercial software.

C++ took the concept of Object Orientated Programming from some other language and the syntax and power of C and made C++. Both C and C++ give you a lower level of abstraction that, with increased complexity, provides a breadth of access to underlying machine functionality that are not necessarily exposed with other languages. C++ adds the convenience (reduced development time) of a fully object oriented language which can, potentially, add an additional performance cost. In terms of real world applications, I see these languages applied in the following domains: C

Kernel level software. Hardware device drivers Applications where access to old, stable code is required. C,C++

Application or Server development where memory management needs to be fine tuned (and can't be left to generic garbage collection solutions). Development environments that require access to libraries that do not interface well with more modern managed languages. Although managed C++ can be used to access the .NET framework, it is not a seamless transition.