Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

A comparison of C#/VC++ and Java

Just saw this posted today. It's a pretty interesting comparison of Java to
C# to C++.

http://www.genamics.com/visualj++/csharp_comparative.htm

Whadda ya think? Is it accurate?

--
Robert Scoble
http://www.vslive.com <<--The Largest Visual Studio Event This Fall
[311 byte] By [Robert Scoble] at [2007-11-9 18:21:07]
# 1 Re: A comparison of C#/VC++ and Java
One thing this guy is comletely lost about is versioning. Not that I could
have done better overall, but the arrogance is off-putting. (part of
developer training these days?!)

This article only repeats what it already said about "virtual" and
"override" as the same thing as versioning. It says nothing about compiler
embedding versioning info in assemblies, manifests, per-app versioning
policies, per-machine versioning policies, private versions of assemblies.

Then what he does talk about is how the compiler could make such
declarations unnecessary, proving only that he completely misses the point!

This should have been a comparison of the old COM GUID version control for
classes, interfaces, typelibs vs the new assembly, declarations, syntax...
in real use cases over the distribution life cycle, how "good things" are
enforced and "bad things" are prevented in the new world, e.g. DLL ****, how
apps connect to the correct version of components...

Otherwise most of the comparison parts looks decent as far as I've read.
But I've only looked much at versioning myself so far, that's why I jumped
to that part...

--Richard.

"Robert Scoble" <rscoble@fawcette.com> wrote in message
news:398666e2$1@news.dev-archive.com...
> Just saw this posted today. It's a pretty interesting comparison of Java
to
> C# to C++.
>
> http://www.genamics.com/visualj++/csharp_comparative.htm
>
> Whadda ya think? Is it accurate?
>
> --
> Robert Scoble
> http://www.vslive.com <<--The Largest Visual Studio Event This Fall
>
>
Richard Curzon at 2007-11-11 22:29:36 >
# 2 Re: A comparison of C#/VC++ and Java
I've written to Ben about his point about the similarities of the VM and the
CLR. My argument is that there is no comparison at all. The CLR is not a
Virtual Machine, since no interpretation takes place. The only ressemblance
i can find, and Ben agrees on this, is the notion of an abstract machine
language (bytecode/IL). But then the GNU C++ system is also a Virtual
Machine, since it compiles to the abstract language of assembler (fx x86),
which then is mapped to machinecode.

Thomas Rohde

"Robert Scoble" <rscoble@fawcette.com> wrote in message
news:398666e2$1@news.dev-archive.com...
> Just saw this posted today. It's a pretty interesting comparison of Java
to
> C# to C++.
>
> http://www.genamics.com/visualj++/csharp_comparative.htm
>
> Whadda ya think? Is it accurate?
>
> --
> Robert Scoble
> http://www.vslive.com <<--The Largest Visual Studio Event This Fall
>
>
Thomas Rohde at 2007-11-11 22:30:42 >
# 3 Re: A comparison of C#/VC++ and Java
Not exactly true. Once again we are victims of Sun's attempts to blur
distinctions between different aspects of Java. Just as they use "Java" to
refer to both the specification for the language, and their implementation
of that specification, they also use "JVM" to refer to both the bytecode
interpreter and to the standard system API. (i.e., for Java to work, at
some level, some parts of the standard library must be written in native
code -- those are considered parts of the JVM)

--
Truth,
James Curran
http://www.NJTheater.com (Professional)
http://www.NovelTheory.com (Personal)
http://www.BrandsForLess.com (Day Job)

"Thomas Rohde" <thro@ddb.dk> wrote in message news:3987270e@news.dev-archive.com...
> I've written to Ben about his point about the similarities of the VM and
the
> CLR. My argument is that there is no comparison at all. The CLR is not a
> Virtual Machine, since no interpretation takes place. The only
ressemblance
> i can find, and Ben agrees on this, is the notion of an abstract machine
> language (bytecode/IL). But then the GNU C++ system is also a Virtual
> Machine, since it compiles to the abstract language of assembler (fx x86),
> which then is mapped to machinecode.
James Curran at 2007-11-11 22:31:40 >
# 4 Re: A comparison of C#/VC++ and Java
Yes, I found the statement that C# requires a virtual machine to be
off-putting as well, it made me question the accuracy of rest of the paper.
One of the interesting points to .NET is the IL feature, which in
conjunction with something like the MS Java Package Manager would make net
distributed code a very compelling platform for intranets applications.

Ralph

--
********* PLEASE NOTE FOR REPLIES **************
My email address is: ralph AT nca DASH corp DOT com
Sorry about this, but spammers happen
**************************************************************
"Thomas Rohde" <thro@ddb.dk> wrote in message news:3987270e@news.dev-archive.com...
> I've written to Ben about his point about the similarities of the VM and
the
> CLR. My argument is that there is no comparison at all. The CLR is not a
> Virtual Machine, since no interpretation takes place. The only
ressemblance
> i can find, and Ben agrees on this, is the notion of an abstract machine
> language (bytecode/IL). But then the GNU C++ system is also a Virtual
> Machine, since it compiles to the abstract language of assembler (fx x86),
> which then is mapped to machinecode.
ralph@nca-corp.com at 2007-11-11 22:32:40 >
# 5 Re: A comparison of C#/VC++ and Java
Hi Robert, Richard, Thomas & James,

I'm sorry if I've come across as arrogant in places. As I said on the post
in the dotnet mailing list, I intend to update the article in about a week
from it's first release, but would correct any factual errors as soon as I
could. As I said to Thomas, and James sees my point, the meaning of
"Virtual Machine" is loose, but to quote Wittgenstein, meaning is in the
usage. I think maybe I can clear this up with these changes:

1. Change this line:

Compiles to machine-independent code which then runs on a VM (in C# the VM
is called the CLR - Common Language Runtime)

To:

Compiles to machine-independent code, which may then be fed to a
Just-In-Time Compiler or be further compiled to machine code

2. Change this line:

The .NET platform is centered around a Common Language Runtime (Virtual
Machine) and set of libraries which can be exploited by a wide variety of
languages, each of the languages compiling to an intermediate langauge (IL)
rather than machine code.

To:

The .NET platform is centered around a Common Language Runtime (Managed
Execution Environment/Virtual Machine) and set of libraries which can be
exploited by a wide variety of languages, by each of the languages first
compiling to an intermediate langauge (IL) rather than machine code.

Richard I think you're selling yourself short - I think you could have done
a better job of the versioning section than myself. If I get enough time
I'll try to go into more detail here. If you've got any suggestions then
I'd like to here them. Please note that I am trying to focus on what C#
does that Java doesn't already accomplish, otherwise the article would have
to be 4 times as long. BTW, I merely wanted to make sure people weren't
conflating the issues of having an override keyword with avoiding method
versioning problems. This is important since many languages will have to
plug into the .NET framework which don't have the override keyword, but will
still be able to handle versioning like this well.

Thanks,
Ben.

Thomas Rohde <thro@ddb.dk> wrote in message news:3987270e@news.dev-archive.com...
> I've written to Ben about his point about the similarities of the VM and
the
> CLR. My argument is that there is no comparison at all. The CLR is not a
> Virtual Machine, since no interpretation takes place. The only
ressemblance
> i can find, and Ben agrees on this, is the notion of an abstract machine
> language (bytecode/IL). But then the GNU C++ system is also a Virtual
> Machine, since it compiles to the abstract language of assembler (fx x86),
> which then is mapped to machinecode.
>
> Thomas Rohde
>
> "Robert Scoble" <rscoble@fawcette.com> wrote in message
> news:398666e2$1@news.dev-archive.com...
> > Just saw this posted today. It's a pretty interesting comparison of Java
> to
> > C# to C++.
> >
> > http://www.genamics.com/visualj++/csharp_comparative.htm
> >
> > Whadda ya think? Is it accurate?
> >
> > --
> > Robert Scoble
> > http://www.vslive.com <<--The Largest Visual Studio Event This Fall
> >
> >
>
>
Ben Albahari at 2007-11-11 22:33:44 >