a .NET hosted scripting language with a focus on meta-programming and embedded DSLs
In the last month I have not finished anything, but implemented a lot. Currently Prexonite is a working, 20'000-lines-of-code calculator library with support for subroutines. The virtual machine correctly interprets all available instructions except for static CLR calls. The application object model represents everything except parameter type constraints and commands. The Prexonite compiler recognizes only GetSet (function calls, variable assignments) and return statements; you can however write your code in Assembler if you need to.
My list of priorities looks like this:
I'm also a bit stuck with the syntax of static CLR calls and object creation. The full syntax would looks as follows:
var obj = new Object("System.Text.StringBuilder");
Now this, of course, is not very intuitive and I would prefer the use of the static member operator "::
"
var obj = new System::Text::StringBuilder;
But while this sample is unambiguous, something like
var obj = new String;
is not.
The simple solution is using a prefix to determine which environment to use and I would say "::
" fits best:
var obj = new::String;
You can also put a space between "new" and "::" if you like (Prexonite is a freeform language). The syntax for static calls would be similar:
//String = PType.String
~String.Escape(someValue);
//String = System.String
::String.Format(someFormat, someValue);
System::Text::Encoding::UTF8.GetBytes("Hello");
If the call starts with an imported namespace ("System" is imported by default), the call will be targeted at the CLR.
Coroutines: I'm not sure if you have to explicitly declare a function to behave like a coroutine or not. As the generated code is identical only the instantiation, the stack context, would differ. Not having to declare coroutines as such would make the syntax and the programmers job a whole lot easier. The architecture would allow me to treat FunctionContexts (the StackContext for functions) like continuations and function references at the same time and therefor act as an implementation of coroutines