One more thing I forgot to ask. This will help me understand what I am
getting into if I do decide to shuffle the two languages. In C#, can I write
a driver to communicate some data over USB? Just curious!
Thanks for all feedback!
> Hello,
>
[quoted text clipped - 4 lines]
> Visual Studio. We can somehow program in C# and when we require the
> power of C++, we can call some C++ code... right?
Yes, but you don't want to switch back & forth willy-nilly. There's
overhead and complexity envolved in the transition, so if (and it's a big
if) you use both C# and C++, you want to make a clear distinction between
which parts are implemented in which language, with a properly defined
interface between them.
> Also C# posesses a large quantity of special classes and these are
> available in .NET frameworks, or atleast I think so????
It's the .NET framework that has the classes. C# just uses them. You can
use them from C++/CLI (the CLR flavor of C++) as well.
> Anyways my question is this, I have some basic experience in C++
> (approxomately 2 years) and now I see that C# may simplify coding.
> But at the same time I do not want to loose what I have learnt in
> C++. Can someone suggest me a good book that merges the the two
> languages or must I continud learning C++ from one book and C#from
> another book?
I wouldn't recomment trying to merge them. While the languages are very
similar, they're also very different. Mastering either one gives you a good
foundation for mastering the other.
> One more thing I forgot to ask. This will help me understand what I am
> getting into if I do decide to shuffle the two languages. In C#, can
> I write a driver to communicate some data over USB? Just curious!
No, you can't. Officially, you can't write a driver in C++ either, although
unofficially, people do. (It's not that C++ is inappropriate for drivers -
it's actually very appropriate. Rather, it's that Microsoft doesn't support
using their C++ compiler for writing drivers, and there are some gotchas if
you decide to go "off road" and do it anyway).
> Also, does one have to know C++ *very well* before they can go onto
> C#.
No. In fact, you're probably better off not knowing C++ at all when it
comes to learning C# (rather, I think the other way 'round is the more
natural learning curve; C# first then C++ when and if you need it).
> In the near future (5 to 7 years) will C++ be buried by C#? What do
> you think about this?
No, not a chance.
C#, like Java, will continue to displace C++ in certain application domains
and, like Java, will continue to leave some application domains unserved.
The CLR itself is actually written in C++, as is the C# compiler, the VB.NET
compiler, and much of the core of the .NET framework classes. There will
always be a place for C++.
-cd
Peter Oliphant - 23 Oct 2007 16:05 GMT
> In the near future (5 to 7 years) will C++ be buried by C#? What do you
> think about this?
>>Yes, that's correct (raylopez99)
>> In the near future (5 to 7 years) will C++ be buried by C#? What do
>> you think about this?
>
> No, not a chance. (you)
Interesting that both of you put your answers in absolutlely certain terms,
yet you totally disagree! :)
However, I believe you are correct, since C# is OWNED by MS, and thus can't
be sold by anyone else who makes computer languages. But anyone can write a
C++ compiler, the details for this language are in the public domain. If C#
completely replaced C++ in the world, then MS could charge $10,000 per copy
for C# and we would all have to buy. Hence, C++ is here to stay (at least as
long as C# anyway).
> No, you can't. Officially, you can't write a driver in C++ either,
> although unofficially, people do. (It's not that C++ is inappropriate for
> drivers - it's actually very appropriate. Rather, it's that Microsoft
> doesn't support using their C++ compiler for writing drivers, and there
> are some gotchas if you decide to go "off road" and do it anyway).
Interesting. Does this mean MS is trying to inhibit us from writing ANY
hardware drivers? If not, what does MS expect us to use? I can't believe
they would push us to OTHER software package to write hardware drivers, as
new hardware is developed all the time, and of course require drivers. I
ould think MS would want us to use their tools to develop these as well.
And since I haven't seen anything like MS VS ASM 2005/2008
Express/PRO/whatever, I guess we can't use ASSEMBLY LANGUAGE either. What
ARE we suppose to use for hardware drivers then?
[==Peter==]
>> Hello,
>>
[quoted text clipped - 57 lines]
>
> -cd
Brian Muth - 23 Oct 2007 16:35 GMT
> Interesting. Does this mean MS is trying to inhibit us from writing ANY
> hardware drivers? If not, what does MS expect us to use?
C
Brian
Carl Daniel [VC++ MVP] - 23 Oct 2007 16:56 GMT
>> In the near future (5 to 7 years) will C++ be buried by C#? What do
>> you think about this?
[quoted text clipped - 8 lines]
> Interesting that both of you put your answers in absolutlely certain
> terms, yet you totally disagree! :)
This debate comes up every few months. C++ isn't going anywhere. C# is
here to stay. There's room for both.
> However, I believe you are correct, since C# is OWNED by MS, and thus
> can't be sold by anyone else who makes computer languages. But anyone
> can write a C++ compiler, the details for this language are in the
> public domain. If C# completely replaced C++ in the world, then MS
> could charge $10,000 per copy for C# and we would all have to buy.
> Hence, C++ is here to stay (at least as long as C# anyway).
Anyone can make a C# compiler - it's ECMA standard 334 (with additions).
See the Mono project for *nix, for example. The standard is, at this point,
pretty much controlled by MSFT, but at this point in the languages life,
that's probably not a bad thing.
-cd
David Wilkinson - 23 Oct 2007 17:09 GMT
> Interesting. Does this mean MS is trying to inhibit us from writing ANY
> hardware drivers? If not, what does MS expect us to use? I can't believe
[quoted text clipped - 5 lines]
> Express/PRO/whatever, I guess we can't use ASSEMBLY LANGUAGE either. What
> ARE we suppose to use for hardware drivers then?
Peter:
You can use the VC++ compiler to write drivers in C, just not C++.
VC++ is really three compilers
C compiler
C++ compiler
C++/CLI compiler

Signature
David Wilkinson
Visual C++ MVP