GuidesC#, Wake up and smell the Java Coffee

C#, Wake up and smell the Java Coffee




Olivier Perron

 

What is C#

What is C#

C# is J++ in disguise!

It has the same features, no pointers, C++ syntax, garbage collection, etc.

It was introduced as J++ died. How strange?

 

C# is J++ in disguise!

It has the same
features, no pointers, C++ syntax, garbage collection, etc.

It was introduced as J++
died. How strange?

 

How hard is it to make a new language based on a language you already
have, you can rename methods and classes, introduce some new features, use the
same development environment, etc.It’s really easy for people like Microsoft.

 

To get a confirmation of that, I recently went on www.microsoft.com and saw the J++ What’s
new page at : http://msdn.microsoft.com/visualj/prodinfo/new.asp.
Notice the comment at the bottom of the page,
Last
Updated: 9/11/99
, there’s been nothing new
since? Seems quite dead to me!

Java compared to C#

 

Java

C#

No Pointers

No Pointers

C++ Syntax, names, symbols

C++ Syntax, names, symbols

Garbage collection

Garbage collection

Object Oriented

Object Oriented

No Macros, Templates, Multiple
Inheritance

No Macros, Templates, Multiple
Inheritance

No Virtual base Classes

No Virtual base Classes

No #define, ::, ., ->

No #define, ::, ., ->

Exception Handling

Exception Handling

Encapsulation, Inheritance, Polymorphism

Encapsulation, Inheritance, Polymorphism

Public, private, protected

Public, private, protected

Interfaces

Interfaces

Compiled to Language Code (Like Byte
Code)

Complied to Byte Code

Interpreted Code

Interpreted Code

Embrace to Kill: Learning business lessons
from Microsoft

 

As
most people know now, Microsoft never wanted Java to succeed. Java was
announced as the language of the future, it was meant to destroy VB, VB script,
Visual Studio and Microsoft didn’t like that. Their answer to this dislike was
not the easy one of rejecting it and advertising VB in a silly way, instead
they used a much better technique, embrace to kill.

 

Embrace to kill means that you act as if you were embracing the technology, you
participate in its development, you get a market share (take someone elses
market share is more adequate here), and actually promote that technology.

That was the embrace, the kill

is to remove the strengths of the product, add problems, take more market share
and finally break it.

 

So, Microsoft participated in Java with
its J++. J++ did not follow the Sun standards for Java like everyone else did.
Why? Because the strength of Java is write once, run anywhere. By breaking the
standards and introducing another JVM, Microsoft broke Java’s first strength.

 

You might ask why people bought J++ if it
was so weak. How about issues like Microsoft being a strong marketing company, J++ having the best
Development Interface, people trusting Microsoft, J++ being cheap (and often free), etc.

 

The next step for Microsoft was to give
the final blow — kill Java. How? C# is their answer.

Also, J++ was killed at the time C# was
born, which was meant to say that Java is not good anymore; now it’s C# time.

 

Of course, everyone loves Java — it’s
becoming so popular everywhere that Microsoft seems like a failure right now, right?
It’s too early to know how C# is going to do on the market, but since its integrated with
.Net and people are looking forward to that with all the hype Microsoft has been building, the odds are certainly in C#’s favor.

 

Ok, now let’s take a step back and think
aloud. Is Java gonna die? No! Why? Cobol is not dead!

Ok then, is C# gonna make it? Yes!

Then, what’s the point? Image and market
share are the points. Now Microsoft appears like a leader with C#, rather than being the
followers of Sun with Java. Now they are in a real competition with Sun; it’s not a fake
partnership anymore. They will also gain market share because it’s looking like
a 50-50 battle now between Java and C#. Usually Microsoft ends up with more than 50% in
that type of battle. That means all the Java players share the remaining 50% or
so and Microsoft gets 50%! Amazing increase isn’t it–

Similarities at a glance–

How to make a J++ to C# converter? Easy,
you only need the replace command, no parsing needed. Seriously, it’s so similar
it’s not even funny. Look at this Java program:

 

import java.system;

 

class HelloWorld{


public static void main(){


System.out.println(–Hello World–);

}

}

 

 

Now look at the same program in C#:

 

using System;

 

class HelloWorld{


public static void Main(){


Console.WriteLine(–Hello World–);

}

}

 

Look at how they tried to hide the import
method by calling it “using System” (This is from Pascal). Also, see the println being
called WriteLine (This is from Pascal again).

Looks like college kids copying each
other’s assignment and replacing function and variable names and thinking the
teacher won’t notice it’s the same assignment.

 

Microsoft has announced the release of a
new service called Jump to .NET (Java User Migration to .NET), which converts
J++ to C#. I don’t think it will attract too many Sun Java developers; it’s
more the old J++ developers that will use that.

As an alternative, you can also re-arrange
your packages to fit the java standards and go to Sun’s Java.

 

Microsoft has lost in court with Sun; they
had to pay Sun $20 million, and the settlement left with only Java 1.1.4. Because Microsoft didn’t want
to follow Sun’s standards, and since they won’t be able to upgrade to Java 2 and beyond, Microsoft will invariably kill off J++.

Conclusion

C# and Java will both be very strong languages in the future
years. Which one is better is really a personal preference on your part, but what we need to know is how it
happened, why it happened, and how we can learn from it.

Remember that nothing is invented anymore, the pattern will
come back. Look at the market and see who else did that and who should
have–

 

By the way, .Net is
Microsoft’s reply to J2EE, another war begins–

 

Latest Posts

Related Stories