Cello
Cello copied to clipboard
Modules
It would be great if libcello wrapped libtool's dynamic module system: http://www.sourceware.org/autobook/autobook/autobook_162.html http://www.sourceware.org/autobook/autobook/autobook_163.html
Then you could get namespacing for cheap:
with (https in module('https.la')) {
var options = new(Table, String, String);
put(options, $(String, "key"), $(String, "key.pem"));
put(options, $(String, "cert"), $(String, "cert.pem"));
lambda(run_server, args) {
var response_writeHead = cast(at(args, 0), Function);
var response_write = cast(at(args, 1), Function);
call(response_writeHead,
$(Int,200),
$(String,"{\"Content-Type\": \"text/plain\"}"));
call(response_write,
$(String,"Hello world!")); }
/* etc */
}
call(https, "createServer", options, run_server);
}
Ah this is a very cool idea. I will definitely take a look into it when I get some time. I've written a dynamic module loader type thing before so should be good fun.
Started work on this in 02a55d2c1e1df86553f4d75b34805dde00930f2a