From: David Kastrup Date: 2006-11-19T19:15:09+09:00 Subject: Re: Ruby vs Java vs c++ "Martin DeMello" writes: > On 11/19/06, El Gato wrote: >> However, it seems to me that you're looking for the expressiveness of >> Ruby and the speed of C++. Welcome to the club. Strangely enough, > > I'm learning OCaml for just that reason :) Some of the Scheme > dialects get some impressive performance figures too, but I haven't > really looked into them as much. I have looked through several compilers. I have to say that one of the most appealing Scheme->C compiler ideas I have seen was to drop the distinction between heap and compiler stack: functions were called with an appropriate continuation data structure, and no function ever properly returned at the C level. Data was allocated using alloca. When the heap/stack combination overflowed, it was garbage-compacted in its entirety. All continuations without a pending reference to them consequently were removed from the stack. This basically made continuations rather easy to implement. Impressive. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum