News for hackers. Stuff that matters.
Re:How to design a replacement for C++ by davidxa on Thursday July 22, 2010 @12:37AM (#1537368)
If you implement closures as thunks, you can just free them when done, no need for GC.

    closure int foo(int x) {return x + y;}
    int(*foo_p)(int) = malloc(sizeof(foo));
    memcpy(foo_p,&foo,sizeof(foo));
    return foo_p;
So, you can add working closures in one keyword (and possibly a special case for function pointer decay).

There are no comments on this comment yet.