Re: a pre-beginner's question: what is the pros and cons of .net, compared to ++
From: Daniel O'Connell [C# MVP] (onyxkirx_at_--NOSPAM--comcast.net)
Date: 01/17/05
- Next message: roseta radfar via DotNetMonster.com: "HttpwebRequest problem."
- Previous message: John Blair: "RemovePreviousVersion does not appear to work!"
- In reply to: Gerry Hickman: "Re: a pre-beginner's question: what is the pros and cons of .net, compared to ++"
- Next in thread: Gerry Hickman: "Re: a pre-beginner's question: what is the pros and cons of .net, compared to ++"
- Reply: Gerry Hickman: "Re: a pre-beginner's question: what is the pros and cons of .net, compared to ++"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 17 Jan 2005 07:53:32 -0600
> > C# code is very fast
>> as well, since it is compiled to the machine level by the framework.
>
> Yes, but what about the FrameWork objects themselves? How many of them are
> just wrappers around COM objects?
Less then one might expect. I would wager that in the average window app the
amount of COM interfaces being called would be roughly equal between
framework wrappers and C++ templates, with the C++ code potentially
producing more COM interfaces(for example if you write an ActiveDocumentHost
or the like, pretty sure one of the standard windows templates does...just
forget if its MFC or WTL).
Also, out of curiosity, how does wrapping a COM object change cause code to
not be machine code?
<snip>
> I notice you avoided the question about writing a video capture (or video
> editing) application with .NET - will this be ready for Longhorn?
>
Actually, you can do both now, although video editing is more complicated as
there are no clean, predefined interfaces to access DirectShow or any of the
rest of the windows codec framework. That doesn't mean tehy cannot be, it
just means you would have to do some work to do it(similarly, if the C++
headers from DirectX didn't expose any DirectShow types you'd have to
manually define the interfaces and provide classes to call them, not really
fun stuff eh?). Don't mistake the functionality not being there in the
standard package as an impliciation the function cannot be achieved. If so
C++ is pretty weak in and of itself as well.
Simple capture is maybe 200 lines of code(plus some generated interface
definitions), but only works with WIAs video acquisition mode, and thus only
with WIA capable input devices. The more complicated, DirectX capture
mechanisms would require considerably more...probably somewhere along the
lines of what you'd have to write in C++ without templates for COM support.
Now, video encoding and decoding is not something that is appropriate in
managed code as it stands now. The current JITs don't deal with SIMD
instructions well, if at all, and the runtime currently has no way to
express the concepts SIMD uses(note that C++ really doesn't nativly either,
the compiler adds extensions). Without this type of support in the runtime,
the JIT has to guess when its appropriate to attempt such work...its just
not fesible.
However, the only thing this shows, and the only thing much of your
arguments have shown, is that it is maturity, not inherent capability at
question here. C++ and x86(or any other existing CPU architecture, excluding
IA64) are quite mature, C# and the .NET VM is not(although the .NET VM was
based off java's VM, java's VM seems to have gone to great lengths to avoid
maturing its instruction set, lest incompatibilities come about).
The VM needs certain features, like a more controllable garbage collecter
and a better way to express paralelled or paralellable code. The languages
need certain features as well, including better ways to manage resources.
However the need for those features will be solved.
Anyway, as for video tools, I know of only one app written in managed code
and that only provides its UI and some other bits(I can't say I understand
exactly whats managed and whats not, most of the unmanaged stuff looks like
codecs), but that would be CleanerXL, by Discreet:
http://www4.discreet.com/cleanerxl/cleaner.php?id=124
- Next message: roseta radfar via DotNetMonster.com: "HttpwebRequest problem."
- Previous message: John Blair: "RemovePreviousVersion does not appear to work!"
- In reply to: Gerry Hickman: "Re: a pre-beginner's question: what is the pros and cons of .net, compared to ++"
- Next in thread: Gerry Hickman: "Re: a pre-beginner's question: what is the pros and cons of .net, compared to ++"
- Reply: Gerry Hickman: "Re: a pre-beginner's question: what is the pros and cons of .net, compared to ++"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|