Well, well I need to know what, C++ or C#??

  • Thread starter Thread starter Carlos Villaseñor M.
  • Start date Start date
C

Carlos Villaseñor M.

Hi every body:

There are some years that I don´t to practice C++, but since 3 moths when I
decide to take up again "C" I encounter that there are 2 versions of "C"
(C++ and C#), the first time, that situation results confused to me. Now I
have some questions: ¿C# will replace to C++? ¿I will to obtain the same
power with C#?

Regards
Carlos Villaseñor
 
Hi,

C# is a language which was designed specifically for the .NET framework.
because of that, if you want to write .NET applications, services or class
libraries, C# is the easiest to use.

C++ .NET is able to build applications that use .NET, native win32 or both.
that way you can reuse existing code in building .NET applications. you
can't do that with C#.

check out Carl Daniel's reply in the thread '.NET' from the 26th of january
2006' for more info.

for rapid application development and enterprise applications, C# is more
suitable (IMO) than C++ because it takes less time to do things.
C++ will still have it's place because it allows you to do manual memory
management, interoperate with native source code, and even to drop into
inline assembly language if you need it. C++ is a long way from dead.

kind regards,
Bruno.
 
Carlos Villaseñor M. said:
Hi every body:

There are some years that I don´t to practice C++, but since 3 moths when
I
decide to take up again "C" I encounter that there are 2 versions of "C"
(C++ and C#), the first time, that situation results confused to me. Now I
have some questions: ¿C# will replace to C++? ¿I will to obtain the same
power with C#?


MS will do unmanaged code as far as I can guess beyond VISTA. They create a
service, define interfaces, create the host-process, which is written in (as
you can see in IIS 7) a mix of managed and unmanaged code. For such things
you need C++.
If you write new code, I would not advise C++.
 
Carlos Villaseñor M. said:
Hi every body:

There are some years that I don´t to practice C++, but since 3 moths when
I
decide to take up again "C" I encounter that there are 2 versions of "C"
(C++ and C#), the first time, that situation results confused to me. Now I
have some questions: ¿C# will replace to C++? ¿I will to obtain the same
power with C#?

Regards
Carlos Villaseñor
C++ does all types of applications, on and off the Windows platform. C# is
..NET only. I don't think there is any intent to replace C++ with C#.
If the spectrum of C# project types and templates meets your needs, great.
If you need to go beyond the boundaries of .NET, C++.
 
If you write new code, I would not advise C++. <<

That's a pretty generic, and might I say brazen statement to make,
unqualified isn't it? :-)

Cheers,
Wayne.
 
msnews.microsoft.com said:
That's a pretty generic, and might I say brazen statement to make,
unqualified isn't it? :-)

agree.

Let's make it
in general, if you write new code, I would not advise C++.

:)
 
Still too broad.
In my company, I often have to build an API for hardware devices or special
software interfaces. so that they can be used by LabVIEW applications.

I could do this with C# and build a class library, but in a lot of cases,
C++ is the best choice:

- using extern "C" interfaces allows any language to use the api, instead of
only the .NET enabled ones.
- often, older code has to be reused of interfaced with. while you can
Invoke dll functions, doing so for lots of functions becomes tedious.
- if the api caller does not use managed types internally, it has to
marshall all data across managed / unmanaged boundaries. i have done a test
where i compared performance when doing a 'select *' query on a large
table. returning the result set using native ODBC: 2 seconds. returning the
results using ADO .NET: 30 seconds because each string had to be marshalled
individually into the LabVIEW environment.

so you see, there are lots of situations where C++ still provides the best
way of doing things.

but for most web /data / enterprise applications i agree with you.

kind regards,
Bruno.
 
Back
Top