Finally trying hard to catch exceptions

Prexonite now comes with exception handling in the form of try-catch-finally blocks. Their implementation is a bit different from the ones in C#.

Prexonite Script:
  1. Add System::IO to Imports;
  2.  
  3. function main
  4. {
  5.     try
  6.     {
  7.         var sw = new StreamWriter("foo.txt");
  8.         sw.WriteLine("It worked!");
  9.     }
  10.     catch(var exc)
  11.     {
  12.         println(exc);
  13.     }
  14.     finally
  15.     {
  16.         dispose(sw);
  17.     }
  18. }

More »

Coroutines in Prexonite

Like the title reads: The Prexonite Scripting language and the virtual machine now support coroutines, routines with multiple entry points. They can be used to implement iterators, generators and infinite lists.

Prexonite Script:
  1. coroutine map(ref f, xs)
  2. {
  3.     foreach(var x in xs)
  4.         yield f(x);
  5. }

More »