General J2EE: .Net: multi-language or just multi-syntax
- Posted by: Sayyed Jamaleddin Pishvayi
- Posted on: June 19 2003 04:22 EDT
.Net claims that they support "multi-language" environment.
I doubt about it, in my opinion .Net is
just a multi-syntax environment. All of the .Net
included languages use a same class library
and omit the languages own libraries
(such as C++ STL, Java APIs, .).
I propose writing an environment with
real multi-language support. In such an environment,
programmers can write their code
in a variety of languages using their full
services and libraries.
The idea could be developed by joining JAVA and C++
(as well as ANSI C). For this purpose, the
environment can be based on JNI mechanism.
Perhaps, it is feasible in a collaboration of
Eclipse CDT, Eclipse JDT, GNU GCC.
P.S. JNI++ is also a good step in this way. (http://jnipp.sourceforge.net).
.Net is multi-language as far as Microsoft goes. It really does add the ability to mix languages in a "managed" way. Your syntax point is a fair one but I think having a common runtime environment goes along way to simplifying the overall .net architecture. The common type system (CTS) and CLR make it even possible to consider multi-language interoperation. These are not new ideas (no mater what Microsoft marketing wants you to believe).
The object database company I work for (FastObjects) has used something similar to CTS for many years to allow C++ and Java APIs to share a common object model within the database. The CLR concept clearly owes a debt to Java's JVM which owes some of its concepts to the old UCSD Pascal p-code processor. Old ideas become new again.
I would love to see Java's rich APIs and standards find their way into .Net, but since .Net is really Microsoft's latest attempt to kill (ok maybe only wound) Java we won't see it. Honestly, I do think .Net offers some powerful tools to Windows developers, but I'll stick with Java.
As far the environment you propose, I'd like to see that sort of system outside of the windows world. I will take a look at the jni++ project. For projects I've worked on in the past, I've been lucky in that I could use a database as a middle layer between C++ and Java. I've used C++ for some device specific higher speed object inserts and Java based clients for display.
Nice point: .Net C++ is a good food for thought. A C++ implementation without multiple inheritance, as CTS and CLR does not allow it! To me, multi-language environment means "software built using multiple programming languages works seamlessly", and not "a number of programming languages hammered and bent out of shape to fit the environment".
CORBA is still the only true multi-language infrastructure.
.Net claims support multiple languages so you can select different languages for
different problems. but how different languages can solve different problems when they only differ in there syntax.
.Net allow us to develop a class under a language and use it in another language while real language features are not availble but in jni++ allow us to implement some methods of a class in java and some in c++ while using real c++ and java features.
CORBA is a great job but is suitable for distributed applications so has a performance penalty,we must extend jni mechanism to support real multi-language support.