Component-oriented languages key to Web services
When I met with Microsoft language architect Anders Hejlsberg, he described C# (C sharp) as "the first true component-oriented language in the C/C++ family."
The programming model of components with associated data (properties) and behaviors (events) is supported more naturally by C#, than by Java, he said. "[Java] emulates properties with naming conventions for access methods and emulates event handlers with adapters and plumbing," said Hejlsberg.
Both Java and C++ enable a component-oriented style of programming, he agreed, but he drew the distinction that in those languages, "components are not first-class"meaning that in C#, simple operations such as changing the label on a graphical button control are handled with simpler syntax and fewer lines of code because the button is a component that takes responsibility for its own look and feel.
Component orientation, said Hejlsberg, lets developers embed their software in any of the several environments where customers will want access to Web services.
Following is a comparison of the characteristics of C++, Java & C#. Peter Coffee
|   | C++ | Java | C# |
| System resource management | Manual memory allocation and release | Automatic garbage collection | |
| Programmer productivity | Few high-level mechanisms | Well-structured data collections and flow-of-control statements | Larger vocabulary of predefined data types, greater flexibility in using them for program flow control |
| Software reliability | Limited type safety features; cumbersome and often- ignored error handling mechanisms | Strongly typed data prevents unintended confusion of operations; exception handling traps errors in well-structured ways | |
| Software performance | Freely usable pointers to data streamline many program operations but also enable many types of programmer error; limited object-oriented facilities impose few run-time overheads | No pointers; occasionally cumbersome conversions between objects and primitive types | Pointers available in labeled "unsafe" code; efficient conversion between objects and values through "boxing" |
| Application portability | Compiles to native code | Compiles to widely supported "byte code" that runs on any platform with Java Virtual Machine | Compiles to .Net Intermediate Language |











