C# -- the Java killer?
Mon Jun 26 21:14:00 GMT 2000
"Nic Ferrier" <firstname.lastname@example.org> writes:
> >Overall it's a nice language --
> Can't say I agree with you.
Let the flamewars begin! :-)
> 3. Same object map as Java
> Which we all know is pants. That's why we're adding paramaterized
> types to Java. You'd have thought MS would have learned from this. If
> C# had parameterized types I'd seriously consider it.
Well, remember that not everyone thinks that parameterized types are
a good idea.
> 4. "unsafe" memory areas
> You bet! GC performance will presumably degrade at some balance of
> "unsafe" to GCed.
True, but the same issue applies to JNI.
> So you should still be able to crash "Windows Millenium" using it
> without much problem (and write nice viruses).
Doesn't look like solving this problem is a goal for C#. If you look at
their press releases it's squarely targeted at the server/middleware
application space that people are using Java for (EJB/Weblogic/etc.)
If so then portability and absolutely rigid protection are less important.
What I do like is how they bind 'unsafe' code into C#. It's similar to
GCJ's use of CNI, where the 'unsafe' (native) code is at least readable
C++ and is linked directly into the application. JNI is just plain awful -
the fact that the interface is so slow and cumbersome makes the use of
'unsafe' code a lot worse than it has to be.
> In conclusion I'd say it was basically Java with added syntax to make
> it look "innovative".
I'm not sure that's all there is to it. It looks like they are working to
fix some of the things that Java got wrong (no multidimensional arrays, etc.)
and targeting more for performance and simplicity rather than extreme
dynamicism. For example it looks like the language is meant to be treated
by a static compiler, not a JIT. I have often thought that Java could be a
great 'server side' language if it would only shed its Web applet roots.
C# seems to go well in that direction. Java also doesn't run well in
embedded environments because bytecode interpretation and JIT compilation
are just too expensive and consume too much memory -- whereas on the other
hand people have been programming embedded systems in C for a long time.
If C# has basically the same footprint as C, but is much nicer syntactically
(and type-safe and object oriented to boot) it could go a long way.
Note that I am NOT a Microsoft supporter; if you don't believe me, please
see my website http://www.boycott-ms.org . I am just giving M$ credit where
it is due. C# looks like an interesting blend of Java-like features and C/C++
Matt Welsh, UC Berkeley
More information about the Java