[4169] in java-interest

home help back first fref pref prev next nref lref last post

Re: Has anybody thought about .... ????

daemon@ATHENA.MIT.EDU (Joan Maria Mas Ribes)
Tue Dec 12 16:54:42 1995

From: Joan Maria Mas Ribes <mas@tele.ucl.ac.be>
Date: Tue, 12 Dec 1995 20:46:39 +0100 (MET)
To: yon@world.std.com, java-interest@java.sun.com

> > 
> > But has anbybody thought about a c2java compiler ??? I really thing this
> > would be usefull. Many people has developed libraries of classes in C++, a
> > one of the reasons why they don't move to java is because they cannot re-u
> > them (native methods only in C !!!). 
> > 
> 	The big problem with this is that most C/C++ libraries would end up 
> violating one of Java's big tenets: NO POINTERS.  Not to mention no 
> destructors, no explicit memory management, etc. etc.
> 
> David
> yon@world.std.com
> 
I agree with you ... pointers are the main problem ... but why do people use pointers
in C++ ??? Mainly for two reasons ... arrays and parameter passing. 

Well, for parameter passing is not difficult to identify and the translator could
deal with it. 
About arrays .. well, this is a bit more difficult ... but once you "see" a ptr=new int [10][10]
you know and can identify the use of such a pointer ... a then "easy" to translate.

About the destructors .. who cares ??? simply ignore them. Java claims to have a garbage
collector which dellocates memory as soon as it's not refered ... 

I don't know if I was clear enought ... when I said from C to Jaca, I really meant from C++
and not from assembler to Java, and not byte code.

--------------------------------------------------------------------------------
     _/ _/   _/ _/   _/ _/_/      JoanMa MAS RIBES
     _/ _/_/_// _/_/_// _/ _/
     _/ _/ _/_/ _/ _/_/ _/_/      Universite Catholique de Louvain
 _/  _/ _/   _/ _/   _/ _/ _/     Laboratoire de Telecommunications
  _/_/  _/   _/ _/   _/ _/  _/    Batiment Stevin
                                  2, Place du Levant
                                  B-1348 - Louvain La Neuve
                                  
  mailto:mas@tele.ucl.ac.be       Tel.: +32 - (0)10 - 478067
                                  Fax : +32 - (0)10 - 472089
                                  
           Security is when everything is settled.  
           When nothing can happen to you.  
           Security is the denial of life.   
--------------------------------------------------------------------------------
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post