N
Nick Malik [Microsoft]
Hello Gerry,
I do enjoy a good argument. However, it appears that this one will not go
very far in actually enlightening anyone. It is my intent that this is my
last full post on this topic. I hope to be clear in this message, as best I
can. I may respond to a single point if, by doing so, I can clarify
something outside the realm of opinion.
If you take C++, and add ATL and MFC ... now you can do more directly in C++
than in C#, mostly because the APIs were designed for C++. The 2.0
Framework is filling in a very large number of the useful calls that were
not present in the current framework, making even this point less important.
There are a few language features in C++ that are not carried through,
TTBOMK, like multiple inheritance but all in all, the languages themselves
are syntactically very similar. Since C# compiles (eventually) to the
machine code level, code written in either language is fast. It's not
really a question of the language.
IMHO, Managed code is not much of a limitation. It simply places the C#
code in the context of a comprehensive system of managing system resources.
I argue that C++ is in a similar context, one with fewer features designed
to catch common errors. C++ users call malloc() without thinking about the
fact that there is an entire system for memory management under the
covers... a system you didn't write. This system is easily corruptible. In
..Net, it is much harder to corrupt the heap. That's hardly a limitation.
we will have to disagree on that point.
C++ is more cross-platform that C#. My statement is that it doesn't buy you
as much as you'd think it would. Certainly not enough to cite C++ as more
powerful than C#. To truly write cross platform code in C++, you have to
rely on libraries that cross over the specific platforms that you wish to
bridge. That is equally limiting. IMHO, this is a toss-up.
Why not? Win forms will run on Longhorn. Web controls will run on newer
versions of IIS. The thing that is changing is the cutting edge, not the
supported body.
Controls as a form of personalization has certainly not worked out very
well. However, controls as a form of development paradigm, where reusable
bits of U/I code can be developed by one party, and used by another, has
been successful for many years. That paradigm will survive. The language,
and the context it runs in, has to support them. The framework is much more
suitable for this kind of capability. (Of course, controls are not limited
to just the U/I, however, in .Net, it also makes sense, IMHO, to provide an
assembly instead of a control if the intent is not to provide a design-time
interface.)
True. However, .Net gives you so many nice things that it is difficult to
imagine comparing the two. Very few C++ applications make any real attempt
to use Web Services. Thousands of LOB applications, OTOH, use Web Services
today, largely because the support offered by Visual Studio and the
framework. That is a successful adoption strategy.
Kinda off topic to comparing C# to C++. Little like my OS/2 sidebar. I'm
not disagreeing though. It's a bit more difficult to simply pass along a
tidbit of JScript. I'm willing to live with the tradeoff.
HTA was fairly specific to IE, and with the open internet being a mixed bag
of browsers (even more so in the past six months with the rise of Firefox),
very few companies invested in HTA outside of the firewall. Therefore the
scope of HTA was limited to the intranet. However, XAML is more powerful
than HTA, and it tailored to be a technology that is not dependent on the
browser (per se) but is actually provided by the workstation environment
itself. This should make the technology more palatible and increase its
adoption. One of the current problems, that XAML will help us solve, is
that too many developers still don't seperate their U/I from the business
layer. Hopefully XAML will provide a clean, consistent, powerful, and
secure thin client interface, which will be adopted by more folks than HTA
was, and will provide an architecturally superior approach to software
development.
It's time we let the browser go back to browsing, and not try to host every
application in the world in it.
Weren't you just arguing that C++ is more powerful? Now, you are
complaining about portions of the framework that call C++ objects? I find
that confusing.
BTW, from what I understand, the majority of the present framework is
entirely C#, and the new framework takes that percentage higher. Clearly,
as long as you are running on Windows 2000 or Windows XP or even Windows
2003, you have C++ under the covers. Eventually, all of the system services
have a C++ interface on them. I don't find it a contradiction that C# uses
the same interfaces as C++ when it can.
Your argument was that C# couldn't do the job. I'm stating that C# is not
the problem... the interfaces are often designed in such a way that it is
difficult to call them from C#. (to be fair, the men and women who designed
them did so long before C# was invented). I do not know if Longhorn will
provide interfaces that are more suitable to coding a device driver in C#.
The analogy was off topic, I admit. My apologies. The point is that if
someone says "MS invented a new technology but didn't immediatly rewrite
everything to use the new technology to the exclusion of the old," I would
say "bravo!" While you many not have intended it, I took your argument as a
statement that MS was at fault for not immediately dumping millions of lines
of existing, working code. I challenged that. Apparently, without success.
Alas.
I'm not an expert in this area, and I'm going to shut up before I swallow my
feet completely.
As another post points out, you can do this now in C#.
As for the last bit, I had no place to suggest your enterprise wasn't
keeping up with good security practices. My statement was hasty and I
humbly withdraw it.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
I do enjoy a good argument. However, it appears that this one will not go
very far in actually enlightening anyone. It is my intent that this is my
last full post on this topic. I hope to be clear in this message, as best I
can. I may respond to a single point if, by doing so, I can clarify
something outside the realm of opinion.
framework.
I'm not sure I follow.
C++ can do everything .NET can do and a lot more besides.
If you take C++, and add ATL and MFC ... now you can do more directly in C++
than in C#, mostly because the APIs were designed for C++. The 2.0
Framework is filling in a very large number of the useful calls that were
not present in the current framework, making even this point less important.
There are a few language features in C++ that are not carried through,
TTBOMK, like multiple inheritance but all in all, the languages themselves
are syntactically very similar. Since C# compiles (eventually) to the
machine code level, code written in either language is fast. It's not
really a question of the language.
Maybe "powerful" is the wrong thing to argue about? You can't really say "C#"
in the above line, because it basically means "managed code" and that
limits it just as much as VB.NET or any other "plug-in" language. (as
pointed out by "C.E.O Gargantua" below).
IMHO, Managed code is not much of a limitation. It simply places the C#
code in the context of a comprehensive system of managing system resources.
I argue that C++ is in a similar context, one with fewer features designed
to catch common errors. C++ users call malloc() without thinking about the
fact that there is an entire system for memory management under the
covers... a system you didn't write. This system is easily corruptible. In
..Net, it is much harder to corrupt the heap. That's hardly a limitation.
There's probably plenty "plus" points of .NET you could cite, but I
don't think "powerful" is one of them...
we will have to disagree on that point.
I hear what you're saying here, but personally I'm not convinced. The
current reality is that C++ is far more portable and has fewer
dependencies, not only across platforms, but even across Windows itself!
C++ is more cross-platform that C#. My statement is that it doesn't buy you
as much as you'd think it would. Certainly not enough to cite C++ as more
powerful than C#. To truly write cross platform code in C++, you have to
rely on libraries that cross over the specific platforms that you wish to
bridge. That is equally limiting. IMHO, this is a toss-up.
In terms of being difficult to read, I agree, but outside the realm of
students and beginners, the maintenance factor is a small price to pay
for not being tied to an ever-changing series of incompatible
frameworks. I'm glad I didn't invest in WinForms or Microsoft's "web
controls" for example.
Why not? Win forms will run on Longhorn. Web controls will run on newer
versions of IIS. The thing that is changing is the cutting edge, not the
supported body.
But people are fed up with all these silly "controls"! That's why
so-called "ActiveX" was such as disaster in Internet Explorer and
Outlook Express.
Controls as a form of personalization has certainly not worked out very
well. However, controls as a form of development paradigm, where reusable
bits of U/I code can be developed by one party, and used by another, has
been successful for many years. That paradigm will survive. The language,
and the context it runs in, has to support them. The framework is much more
suitable for this kind of capability. (Of course, controls are not limited
to just the U/I, however, in .Net, it also makes sense, IMHO, to provide an
assembly instead of a control if the intent is not to provide a design-time
interface.)
Regarding the "web" and "web services", it's very simple. You have HTTP,
HTML, XML and various CGI/ISAPI interfaces. Everything else is just
marketing hype from people trying to make it sound complicated. You
certainly don't need .NET to run web services.
True. However, .Net gives you so many nice things that it is difficult to
imagine comparing the two. Very few C++ applications make any real attempt
to use Web Services. Thousands of LOB applications, OTOH, use Web Services
today, largely because the support offered by Visual Studio and the
framework. That is a successful adoption strategy.
I do agree that ASP and ASP.NET are good for web applications and web
scripting, but Microsoft's direction is now moving away from open web
standards and that means .NET will become less attractive. It's already
much more difficult than it should be to leverage x-browser DHTML in
Microsoft's .NET products, whereas it's very easy in ASP, PHP or PERL.
This is where you end up fighting with the framework; in ASP you can add
a few lines of JavaScript/css and it's done in five minutes; with .NET
you have to learn the ins and outs of an oddball "web server control"
and are tied to what it can (and can't) do.
Kinda off topic to comparing C# to C++. Little like my OS/2 sidebar. I'm
not disagreeing though. It's a bit more difficult to simply pass along a
tidbit of JScript. I'm willing to live with the tradeoff.
We also see Microsoft's HTA
technology (which supports open standards) moving towards XAML which
does not - another step backwards in the realm of Enterprise computing,
HTA was fairly specific to IE, and with the open internet being a mixed bag
of browsers (even more so in the past six months with the rise of Firefox),
very few companies invested in HTA outside of the firewall. Therefore the
scope of HTA was limited to the intranet. However, XAML is more powerful
than HTA, and it tailored to be a technology that is not dependent on the
browser (per se) but is actually provided by the workstation environment
itself. This should make the technology more palatible and increase its
adoption. One of the current problems, that XAML will help us solve, is
that too many developers still don't seperate their U/I from the business
layer. Hopefully XAML will provide a clean, consistent, powerful, and
secure thin client interface, which will be adopted by more folks than HTA
was, and will provide an architecturally superior approach to software
development.
It's time we let the browser go back to browsing, and not try to host every
application in the world in it.
Yes, but what about the FrameWork objects themselves? How many of them
are just wrappers around COM objects?
Weren't you just arguing that C++ is more powerful? Now, you are
complaining about portions of the framework that call C++ objects? I find
that confusing.
BTW, from what I understand, the majority of the present framework is
entirely C#, and the new framework takes that percentage higher. Clearly,
as long as you are running on Windows 2000 or Windows XP or even Windows
2003, you have C++ under the covers. Eventually, all of the system services
have a C++ interface on them. I don't find it a contradiction that C# uses
the same interfaces as C++ when it can.
I think the word "if" is the important one here! Is this going to be
ready for Longhorn?
Your argument was that C# couldn't do the job. I'm stating that C# is not
the problem... the interfaces are often designed in such a way that it is
difficult to call them from C#. (to be fair, the men and women who designed
them did so long before C# was invented). I do not know if Longhorn will
provide interfaces that are more suitable to coding a device driver in C#.
I've read all that, but this is way of the topic we were talking about.
I agree about OS/2 in the realm of desktop computers, but I don't see
what this has to do with C++ vs .NET?
The analogy was off topic, I admit. My apologies. The point is that if
someone says "MS invented a new technology but didn't immediatly rewrite
everything to use the new technology to the exclusion of the old," I would
say "bravo!" While you many not have intended it, I took your argument as a
statement that MS was at fault for not immediately dumping millions of lines
of existing, working code. I challenged that. Apparently, without success.
Alas.
Let's say you want to add a new Anti-Virus service account to all
workstations in the OFFICE4 OU - "User Rights Assignment". You can't use
AD and GPO, because doing so would delete all rights of the local
WSxx\ASPNET service accounts, so you have to add the account to the list
of user-rights on the actual machines. Can this be done with .NET, or
can you even list the existing ones with .NET?
I'm not an expert in this area, and I'm going to shut up before I swallow my
feet completely.
I notice you avoided the question about writing a video capture (or
video editing) application with .NET - will this be ready for Longhorn?
As another post points out, you can do this now in C#.
As for the last bit, I had no place to suggest your enterprise wasn't
keeping up with good security practices. My statement was hasty and I
humbly withdraw it.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--