8 Jun 2010 03:32
Re: Reflections in Limbo?
one of the grave, but extremely simple examples
implement Selfmod;
include "sys.m";
include "draw.m";
include "sh.m";
Selfmod: module {
init: fn(ctxt: ref Draw->Context, argv: list of string);
};
init(ctxt: ref Draw->Context, argv: list of string){
sys := load Sys Sys->PATH;
sh := load Sh Sh->PATH;
prg := "implement hw;" +
"include \"sys.m\";" +
"include \"draw.m\";" +
"hw: module {" +
" init: fn(ctxt: ref Draw->Context, argv: list of string);" +
"};" +
"init(ctxt: ref Draw->Context, argv: list of string){" +
" sys := load Sys Sys->PATH;" +
" sys->print(\"hello world\");" +
"}";
sys->print("%s\n",
sh->system(ctxt,
"mount -c {memfs -s} /opt ;" +
"echo '" + prg + "' > /opt/tst.b ;" +
"limbo -o/opt/tst.dis /opt/tst.b ;" +
"/opt/tst.dis ;" +
"unmount /opt")
);
}
05.06.10, 09:30, "rommanio-p9" <rommanio-p9@...>:
> Hello.
>
> Is it in limbo programming language analogue of reflections (such as
> in Java/.NET)?
>
>
> --
> Sincerely yours.
> Roman Jaryzhenko.
>
>
>
--
--
Здесь спама нет http://mail.yandex.ru/nospam/sign
RSS Feed