Re: learn C++ or C#
In article news:<OZyOgzF6I HA.2260@TK2MSFT NGP03.phx.gbl>, Daniel wrote:
It depends what you want to do, and where you want to do it.
C++ is the more powerful language but there is more to learn, C# is
relatively simple but less powerful. OTOH there are more productivity
tools for C# (largely because it has a simpler syntax, so the tools are
easier to write).
C++ can be used to write software for a huge range of systems -- not
only Windows but also Mac, linux and others (including mini and
mainframe computers, and embedded systems). C# targets a virtual machine
architecture, so C# programs can run only on computers for which such a
runtime (a JIT compiler or an interpreter) is available -- that means
Windows, certainly, and platforms that support Mono (an Open Source
NET-compatible runtime); but not nearly so many as can run C++
programs.
C++ can be used to write system-level code: operating systems, device
drivers, etc.. Although there are research projects and proof of concept
implementation that use C# for these things, current C# implementations
do not allow C# to be used for this kind of work with mainstream OSes --
you can't write even a Windows device driver in C#. If you want to do
driver work then choose C++ (or even C).
A good implementation plan is to write your back-end code -- the
business logic of your application -- in a fast portable language (such
as C++) so that it can be built to run on the maximum possible number of
platforms, and then to write a GUI wrapper around it for each platform
on which you want to ship ... you might choose to write such a GUI
wrapper in C# for a Windows version of your software, though other
possibilities (including VB, Java, Python, etc) exist.
Alternatively you could write your application logic in a webserver
format and use your platform's browser for the GUI, which would save you
writing any platform-specific GUI code at all.
Personally, I usually write the application back-end in C++ and then
write the Windows-specific GUI wrapper in C++ using MFC ... but then I'm
from a C++ background and I just do what comes naturally.
Cheers,
Daniel.
In article news:<OZyOgzF6I HA.2260@TK2MSFT NGP03.phx.gbl>, Daniel wrote:
If I haven't made substantial investment in either C++ or C#, which
language would the experts recommend I become well acquainted with?
language would the experts recommend I become well acquainted with?
C++ is the more powerful language but there is more to learn, C# is
relatively simple but less powerful. OTOH there are more productivity
tools for C# (largely because it has a simpler syntax, so the tools are
easier to write).
C++ can be used to write software for a huge range of systems -- not
only Windows but also Mac, linux and others (including mini and
mainframe computers, and embedded systems). C# targets a virtual machine
architecture, so C# programs can run only on computers for which such a
runtime (a JIT compiler or an interpreter) is available -- that means
Windows, certainly, and platforms that support Mono (an Open Source
NET-compatible runtime); but not nearly so many as can run C++
programs.
C++ can be used to write system-level code: operating systems, device
drivers, etc.. Although there are research projects and proof of concept
implementation that use C# for these things, current C# implementations
do not allow C# to be used for this kind of work with mainstream OSes --
you can't write even a Windows device driver in C#. If you want to do
driver work then choose C++ (or even C).
A good implementation plan is to write your back-end code -- the
business logic of your application -- in a fast portable language (such
as C++) so that it can be built to run on the maximum possible number of
platforms, and then to write a GUI wrapper around it for each platform
on which you want to ship ... you might choose to write such a GUI
wrapper in C# for a Windows version of your software, though other
possibilities (including VB, Java, Python, etc) exist.
Alternatively you could write your application logic in a webserver
format and use your platform's browser for the GUI, which would save you
writing any platform-specific GUI code at all.
Personally, I usually write the application back-end in C++ and then
write the Windows-specific GUI wrapper in C++ using MFC ... but then I'm
from a C++ background and I just do what comes naturally.
Cheers,
Daniel.
Comment