home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Recommendation: C++ coding instead of C# & .NET
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Mars Warrior" data-source="post: 5148" data-attributes="member: 10351"><p><strong>Let's Retire C and C++</strong></p><p></p><p><span style="font-size: 26px"><strong>Let's Retire C and C++</strong></span></p><p></p><p><span style="font-size: 22px">They are tired and they can kill productivity</span></p><p></p><p>C and C++ are old and tired languages that have outlived their usefulness. For programmers, there are more productive ways to develop software. The odds of getting engineers a reliable program to use are significantly better with C#. While C and C++ are expressive and powerful languages, letting anyone but very experienced programmers use them is like greasing the floors and letting your programmers run across it with knives. The most likely victims will be schedules and/or code reliability. </p><p></p><p>Productivity is significantly influenced by a language's ease of use and the time it takes to debug and fix problems. Any language that requires a book like "C++ Gotchas", which describes 99 common C++ programming mistakes, has serious usability issues. For instance, who really has a handle on how to decipher C type declarations like:</p><p></p><p>char *(*(*a[5])())();</p><p></p><p>Don't get me started on the myriad string data types and APIs you have to deal with: ASCII char*, multi-byte char*, wchar_t, CString, BSTR, CComBstr, _bstr_t and basic_string<>. Come on! How many different ways of dealing with a string do we need?</p><p></p><p>By far the biggest productivity killer is the vast potential for writing buggy C or C++ code. Dynamic memory management and the pointers typically used in conjunction with them get more programmers into trouble than any other feature of C or C++. If you don't remember to explicitly free memory you have memory leaks. If you access memory that has been freed, your program may crash or behave unexpectedly. Indices used to access arrays are not validated in C or C++. As a result, an "off by one" error can cause undetected memory stomps that in turn can cause your program to crash somewhere completely different than where the stomp occurred. </p><p></p><p>C# leaves C and C++ in the dust when it comes to programmer productivity. C# and the underlying Microsoft .NET platform put to good use the exponential improvement in computing power that has occurred in the 30 years since C was created. The extra compute capacity is used to provide automatic garbage collection, which eliminates memory leaks and freed memory reads altogether. Array accesses are always checked at runtime to verify the index is valid; this eliminates one source of memory stomps. Since C# doesn't require the use of pointers, another class of memory stomps are eliminated. While these services require a little extra computing power, the way I look at it is that hardware is cheap, software development time is not.</p><p></p><p>Many C/C++ programmers are concerned about standards and performance. C# has been standardized by both ECMA and ISO. C# performance is not only better than Java and Visual Basic, it also isn't too far off the performance of C/C++. Furthermore, most instrumentation automation programs are performance limited not by the development language but by instrument I/O.</p><p></p><p>It is very easy to get started using C#. You can download the Microsoft .NET Framework SDK for free at: <a href="http://msdn.microsoft.com/netframework/downloads/howtoget.aspx" target="_blank">http://msdn.microsoft.com/netframework/downloads/howtoget.aspx</a>. </p><p></p><p>The SDK comes with the C# command line compiler as well as many sample programs. I predict that you will be pleasantly surprised at how far your C or C++ skill set can take you with C# and how much more productive you will be!</p><p></p><p>And that my friends, ends this happy story :lol:</p></blockquote><p></p>
[QUOTE="Mars Warrior, post: 5148, member: 10351"] [b]Let's Retire C and C++[/b] [size=7][b]Let's Retire C and C++[/b][/size] [size=6]They are tired and they can kill productivity[/size] C and C++ are old and tired languages that have outlived their usefulness. For programmers, there are more productive ways to develop software. The odds of getting engineers a reliable program to use are significantly better with C#. While C and C++ are expressive and powerful languages, letting anyone but very experienced programmers use them is like greasing the floors and letting your programmers run across it with knives. The most likely victims will be schedules and/or code reliability. Productivity is significantly influenced by a language's ease of use and the time it takes to debug and fix problems. Any language that requires a book like "C++ Gotchas", which describes 99 common C++ programming mistakes, has serious usability issues. For instance, who really has a handle on how to decipher C type declarations like: char *(*(*a[5])())(); Don't get me started on the myriad string data types and APIs you have to deal with: ASCII char*, multi-byte char*, wchar_t, CString, BSTR, CComBstr, _bstr_t and basic_string<>. Come on! How many different ways of dealing with a string do we need? By far the biggest productivity killer is the vast potential for writing buggy C or C++ code. Dynamic memory management and the pointers typically used in conjunction with them get more programmers into trouble than any other feature of C or C++. If you don't remember to explicitly free memory you have memory leaks. If you access memory that has been freed, your program may crash or behave unexpectedly. Indices used to access arrays are not validated in C or C++. As a result, an "off by one" error can cause undetected memory stomps that in turn can cause your program to crash somewhere completely different than where the stomp occurred. C# leaves C and C++ in the dust when it comes to programmer productivity. C# and the underlying Microsoft .NET platform put to good use the exponential improvement in computing power that has occurred in the 30 years since C was created. The extra compute capacity is used to provide automatic garbage collection, which eliminates memory leaks and freed memory reads altogether. Array accesses are always checked at runtime to verify the index is valid; this eliminates one source of memory stomps. Since C# doesn't require the use of pointers, another class of memory stomps are eliminated. While these services require a little extra computing power, the way I look at it is that hardware is cheap, software development time is not. Many C/C++ programmers are concerned about standards and performance. C# has been standardized by both ECMA and ISO. C# performance is not only better than Java and Visual Basic, it also isn't too far off the performance of C/C++. Furthermore, most instrumentation automation programs are performance limited not by the development language but by instrument I/O. It is very easy to get started using C#. You can download the Microsoft .NET Framework SDK for free at: [url]http://msdn.microsoft.com/netframework/downloads/howtoget.aspx[/url]. The SDK comes with the C# command line compiler as well as many sample programs. I predict that you will be pleasantly surprised at how far your C or C++ skill set can take you with C# and how much more productive you will be! And that my friends, ends this happy story :lol: [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Recommendation: C++ coding instead of C# & .NET
Contact us
RSS
Top
Bottom