there are restrictions on what could be done at compiler level in
terms of optimizations - scala, for example, can only optimize tail
recursions to the same method and only for non-overridable methods
a TCR optmization should work across multiple tail recursive method
invocations without blowing the stack - currently, to do that, you
have to trampoline

but i generally agree with joshua in that we need an even better
desktop story (it is already shaping up quite nicely)


On Wed, Jun 17, 2009 at 12:15 AM, Weiqi Gao<weiqi...@gmail.com> wrote:
>
> The JVM is nothing but a big compiler (and a garbage collector + some
> other stuff.).
>
> Joshua Marinacci wrote:
>> I guess I always thought tail recursion was a compile time trick, not
>> something to be done in the JVM. Is it that people want tail recursion
>> added to the Java language?
>> On Jun 16, 2009, at 8:03 PM, Michael Kimsal wrote:
>>
>>> My understanding is people want this in the JVM so that it's
>>> standardized, and worked on by core people.  I may be misinterpreting
>>> the call for it, but I take it as similar to the 'invokeDynamic' stuff
>>> that is coming up in Java.  That same sort of behaviour is being
>>> attempted in things like Groovy already.  If it's a standardized part
>>> of the core JVM, then everyone can stop working on their own
>>> implementations and share in the continued development that those
>>> features can enjoy because they are centralized.
>>>
>>> Anyone with more insight on why TCR should be in the core JVM itself
>>> and not in external projects?
>>>
>>>
>>> On Tue, Jun 16, 2009 at 10:57 PM, Joshua Marinacci <jos...@gmail.com
>>> <mailto:jos...@gmail.com>> wrote:
>>>
>>>     Is there a reason why this needs to be added to the JVM? Couldn't
>>>     functional languages on the JVM implement it in their own compiler
>>>     (Scala, Lisp, Scheme, etc.)
>>>     -j
>>>
>>>     On Jun 16, 2009, at 5:53 PM, Paul King wrote:
>>>
>>>>
>>>>     If you want to apply a functional style to your programming, even
>>>>     relatively simple algorithms
>>>>     which intuitively shouldn't require many resources bomb out early
>>>>     without tail call optimizations.
>>>>     It isn't the end of the world but you have to choose less
>>>>     expressive/declarative solutions to
>>>>     your problems which as well as being less elegant are much harder
>>>>     to understand/maintain.
>>>>
>>>>     Cheers, Paul.
>>>>
>>>>     On Wed, Jun 17, 2009 at 8:20 AM, Joshua Marinacci
>>>>     <jos...@gmail.com <mailto:jos...@gmail.com>> wrote:
>>>>
>>>>         Okay.. seriously dudes! I've been hearing this request over
>>>>         and over. Of all of the things missing from the Java platform
>>>>         (and they are many, believe me), why is *tail recursion* the
>>>>         make or break feature for the future of the Java platform?
>>>>         Seriously?! Tail Recursion?!  Not fixing applets or
>>>>         modularity or starting up 18 times faster, but tail
>>>>         recursion!? WTH!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Michael Kimsal
>>> http://jsmag.com <http://jsmag.com/> - for javascript developers
>>> http://groovymag.com <http://groovymag.com/> - for groovy developers
>>> 919.827.4724
>>>
>>>
>>
>>
>> >
>
>
> --
> Weiqi Gao
> weiqi...@gmail.com
> http://www.weiqigao.com/blog/
>
> >
>



-- 
http://mapsdev.blogspot.com/
Marcelo Takeshi Fukushima

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

Reply via email to