Say we wanted to have something like the classic try-finally, where 
we're using gotos as our exceptions. Is there any way that we can tie 
into the stack unwinding so that we could implement this pseudo 
felix-python hybrid?

////////////////////////////////////
proc foo (f:() -> unit) {
  try
    print "before"; endl;
    f();
  finally
    print "finally"; endl;
  done;

  print "after";
}

foo { };
print "done"; endl;
endl;

foo { goto end; };
end:>

print "done"; endl;
////////////////////////////////////

to print out:

////////////////////////////////////
before
finally
after
done

before
finally
done
////////////////////////////////////

?

-e

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to