So far, so good; almost all of the arithmetic operations and other built-ins have been removed, awaiting reimplementation in stack-aware forms; but other than that, everything remains intact and functional.
The following Epoch program demonstrates the working stack:
entrypoint : () -> (){ integer(test, 2) testfunction(test, 40, "Output, this is a test")}testfunction : (integer(foo), integer(bar), string(baz)) -> (){ debugwritestring(baz) debugwritestring(cast(string, add(foo, bar)))}
You may note that lexicalcast is gone, in favor of the more succinct and flexible cast operation. This operation will be the basis for all type conversions in the language, at least so far as I can foresee at the moment. With a small amount of work, real/integer and real/string conversions will be possible as well as string/integer conversions.
One of the trickier bits I had to wrap my head around was splitting the type checking into load-time rather than run-time. This is basically a crude bit of static analysis, done to ensure things maintain correct types; the stack itself contains no type annotations, just data, so it is mandatory that we are statically aware of what kind of data resides at each slot in the stack.
That seems to have been conquered, though, and leaves me with just a handful of minor reimplementation tasks before everything is back up to Release 2 levels of functionality. Woohoo!
As I think I've stated before, my next big project is a Scribble application, where you can draw neat little squigglies on a blank white window using the mouse. This will be a full test of several features, most notably structures, since structure support is required for communicating to most of the Win32 API.
At the moment, I have no idea how I'm going to implement structures, so I might content myself with making a tidy-up pass on the Fugue code and putting out a Release 3 to demo the stack-based changes.
So Epoch continues to progress. I'm not sure if I'll hit my goal of having a workable prototype language ready for GDC '09, but I should get pretty darn close. At the very least I'll have enough to prove that Epoch can be a viable real-world production language, given enough patience and grunt work - and that's all I really want to accomplish anyways.
Taking over the world is just a bonus.