[bitc-dev] Opinions wanted: Infix shift operators

Kristopher Micinski krismicinski at gmail.com
Fri Aug 6 12:11:47 PDT 2010

On Fri, Aug 6, 2010 at 11:45 AM, wren ng thornton <wren at freegeek.org> wrote:

> Jonathan S. Shapiro wrote:
> > I would actually prefer to use the currying syntax myself, and if someone
> > can show me how to make that work I think I would adopt it.
> For value-level stuff, the approach used by the spineless taggless
> g-machine (GHC's runtime machine) offers one way of implementing
> currying without the overhead you get from the naive implementation.
> Essentially, you use a closure of the eta-expanded form. The first
> pointer is to the code block, and the remaining pointers/values are the
> stack frame. (Thus, you can take over the extra pointer in the C call
> stack, just like OOP does for passing an object's vtable.) I'm assuming
> BitC uses a C-like call stack instead of putting everything in the heap
> like functional languages do, so the exact approach would need some
> modification to fit in with BitC's execution model, but I don't foresee
> any show-stopping issues.
> I'd need to know a lot more about BitC's execution model before I could
> offer any more concrete advice.
> --
> Live well,
> ~wren
> _______________________________________________
> bitc-dev mailing list
> bitc-dev at coyotos.org
> http://www.coyotos.org/mailman/listinfo/bitc-dev

I haven't studied the G-Machine at all, but would be interested. Can you
point us in the direction for reading? I found Simon P. Jones' paper on it,
and also know his book details how he uses it in implementing functional
languages, but if you have any other pointers I'd be glad to go read it.
(Perhaps I should just read the source? If it's readable :) ???)

Kris Micinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.coyotos.org/pipermail/bitc-dev/attachments/20100806/1f89fff4/attachment.html 

More information about the bitc-dev mailing list