[squeak-dev] Using V8 for other languages

Avi Bryant avi at dabbledb.com
Fri Sep 5 20:04:35 UTC 2008


On Fri, Sep 5, 2008 at 12:17 PM, David Griswold
<david.griswold.256 at gmail.com> wrote:

> But you are right; at least now that there are multiple fast JavaScript
> implementations, a lot more stuff will target it.

One interesting (if odd) just-released language that targets
JavaScript is Objective-J: http://cappuccino.org/ .  It's a near clone
of Objective-C (only without the C), that compiles to JavaScript on
the fly in the browser.  For example:

import <Foundation/CPString.j>

@implementation CPString (Reversing)

- (CPString)reverse {
    var reversedString = "", index = [self length];
    while(index--)
        reversedString += [self characterAtIndex: index];
    return reversedString;
}

@end

I suppose that's as close to Smalltalk running on V8 as we're likely
to see for a while...

Avi



More information about the Squeak-dev mailing list