On Fri, 2006-01-06 at 18:00 +0100, Nicolas Cannasse wrote: > dpb wrote: > > Hi, while trying to build the CVS, I get: > > > > > > (cd src; LD_LIBRARY_PATH=../bin: NEKOPATH=../boot ../bin/nekovm neko > > tools/install.neko) > > (cd src; LD_LIBRARY_PATH=../bin: NEKOPATH=../boot ../bin/nekovm > > tools/install) > > ../bin/nekovm neko tools/test.neko > > cp tools/test.n ../bin/tools > > ../bin/nekovm neko tools/nekoboot.neko > > cp tools/nekoboot.n ../bin/tools > > ../bin/nekovm neko mtypes/std.neko > > cp mtypes/std.n ../bin/mtypes > > ../bin/nekovm nekoboot ../bin/neko.n > > Uncaught exception - load.c(171) : Module not found : nekoboot > > Called from tools/install.neko line 241 > > Called from tools/install.neko line 174 > > Uncaught exception - Error 256 : aborted > > make: *** [libs] Error 1
Neko exception? Why not get rid of them? Exceptions are a very bad idea: they're WAY too powerful. We desire to escape from a context, but in a controlled way. Call/cc actually seems better to me. Felix uses non-local goto**, which I think is equivalent. Note you can wrap a non-local goto in a closure and pass it to a procedure which invokes that closure to cause the control transfer, however whilst this shows the target does not have to be directly visible, it also demonstrates the key feature of this technique -- you are statically assured that error handlers exist -- you cannot 'throw' an exception which will not be caught. Invoking an alternate continuation in call/cc style also has this property. **actually it also supports throwing C++ exceptions, and, it supports abortion (premature termination) by throwing them .. however this is hidden inside the language implementation. In particular, the abort points are known and relay the source code location of the abort request. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net --- Neko : One VM to run them all
