On Jan 16, 2009, at 15:47, e wrote:

> Is it much much easier to make byte code than assembly code?  I  
> mean, I understand why running on a VM makes sense as far as  
> instantly inheriting all the massive amounts of things out here for  
> Java .... but would it be possible to shoot for something down the  
> road that, behind the scenes, uses jvm whenever you say,  
> "import" . . .and writes and compiles assembler whenever you are  
> doing purely algorithmic things?

There are (at least) two reasons not to go that way:

1) The JVM provides a lot of infrastructure for programming languages  
that otherwise each compiler/interpreter would have to reinvent.  
Memory handling with garbage collection, for example. And of course a  
lot of platform-specific OS interfacing. Reinventing them is not only  
a lot of work, but also creates compatibility barriers in multi- 
language programming. It is very difficult to combine languages A and  
B if each of them has its own memory management.

2) Compiling to a mix of native code and JVM bytecode brings up a lot  
of ugly platform dependencies, the kind that makes the Java native  
interface so unpleasant to use.

There is a reason why virtual machines like the JVM and CLI (.Net/ 
Mono) are gaining popularity. They provide security (by supervising  
programs' acces to the machine resources), portability,  
infrastructure, and the possibility to mix languages easily. There is  
a performance price to pay for this, but apparently more and more  
people are willing to do so, and at the same time that price is going  
down.

Konrad.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to