Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Thoughts on the JVM as a compilation Target?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Torben Ęgidius Mogensen  
View profile  
 More options May 29 2012, 11:40 am
Newsgroups: comp.compilers
From: torb...@diku.dk (Torben Ęgidius Mogensen)
Date: Tue, 29 May 2012 17:40:03 +0200
Local: Tues, May 29 2012 11:40 am
Subject: Re: Thoughts on the JVM as a compilation Target?

BGB <cr88...@hotmail.com> writes:
> maybe trying for a small list here:
> lack of unsigned operations;
> lack of pointers;
> lack of function or method references;
> lack of variable references (need not be pointers);
> lack of a lexical environment;
> lack of good dynamic types;
> lack of package-scoped declarations;
> lack of operators over object types;
> lack of pass-by-value / structure types;
> lack of RAII or similar;
> lack of a good C FFI.

A few more:

 - Lack of proper tail calls.

   This can be implemented using trampolines, but this is inefficient
   and kludgy.  Scala (AFAIR) implements only tail recursion and not
   proper tail calls because of this limitation.

 - Lack of non-nullable reference types.

   Object/reference types are implicitly always nullable, though it is
   simple to statically verify non-nullable types.  The consequence is
   that the VM always has to check for null pointers when following
   references, even when the reference can never be to null.

 - Lack of structural type equivalence.

   This means that you have to resort to kludges when implementing pair
   types and similar structures, and it gives problems when implementing
   (type-safe) polymorphic pair types.  Which leads to

 - Lack of parametric polymorphism.

   Generics is currently implemented with type erasure to Object and
   (runtime-checked) downcasts, which is inefficient.  Statically
   verified parametric polymorphism could avoid this.

 - Lack of an unbounded integer type.

   Though this can be implemented using JVM primitives, it is slow and
   kludgy to do so.  Many languages (Scheme, Haskell, ...) have
   unbounded integers.

 - Inefficient exception handling.

   This was a real limitation for some students that tried to implement
   a subset of Prolog in JVM.  Exceptions were the natural way to
   implement cut (!), but it was just way too slow.

This is what I could think off at the top of my head, but I'm sure more
would come up if I tried to use JVM as target for a realistically-sized
language (as opposed to toy languages).

        Torben


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.