Re: C++ vs. C#
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:lg04u4l03k3ldariav9pb6ntdcss6hp93u@4ax.com...
I don't see much reason to debate the value of these two languages;
C++/MFC works fine if
you want native applications, and when extensive computational loads are
required, it
usually creates more efficient code. But efficiency often doesn't matter,
such as in GUI
interfaces. Ultimately, you choose the language most appropriate for the
solution space,
which includes the nature of the problem, the nature of the platform, the
needs of the
client, and similar decisions.
For practical purposes, C# and C++ are roughly the same. While they trade
off conveniences (RAII is better in C++ vs. 'using' in C#; C# strings can
be literal using '@' vs. ugly _T() in C++, etc.) there is little
productivity advantage of one or the other for experienced C++ people. It
is a matter of taste and familiarity.
What people are really comparing when they say C++ vs. C# is MFC vs. .NET.
Here it is no comparison, MFC is a dated concept whose only lovers are
people who compare it to C/Win32, or even assembler. .NET is much richer
and easier to use. Many of the questions we routinely answer in this
newsgroup are taken care of automatically in .NET. For example, someone
asked why accessing m_hwnd in the ctor of the CWnd-derived class didn't
work, or why setting a style after the window was created did not have any
effect. All of these things are taken care of in WinForms so the question
doesn't even arise.
I have about 4x the experience in C++ vs. C#, so prefer C++. But I much
prefer WinForms over MFC. For several years I have not felt at home in
either as both had significant disadvantages as cited in this thread. I'm
hoping my new love of Qt lasts! :-)
-- David