I stopped develepment of a language that had some of these features.
It looked like a mixture of Java/C++ but less powerful (but sufficient for my needs).
It was OOP, had single inheritance, simple overloading etc.
It had three data types, string, int and float (int was abused as bool).
The compiler generated a big file (the program) that was later loaded by the VM. Then you could create a "thread" that ran the actual function.
A manager was responsible to collect all threads and for pausing/resuming them. It had one function that executed the next opcode in each active thread.
The VM was a rather simple stack-based machine.
The last thing I tried to implement were static member variables and methods.
Well, in the end it got too complex (mainly due to some bad design decisions - not concerning the script syntax but the implementation of the compiler).
Another negative point was that it was made in Delphi, so porting etc. was not really that good.
One of the most annoying things was integration with the engine, which I didn''t think through that well
![](smile.gif)
A simple script looked something like this:
class CDoor { int open = 0; void OpenDoor() { if(open==1) { Ego.Say("It'' already open."; } else { Ego.Say("Ok. Open."; open = 1; } return; } void CloseDoor() { if(open==0) { Ego.Say("It''s closed already."; } else { Ego.Say("Ok. Closed."; open = 0; } return; }}
Maybe I''ll work out the flaws and re-implement it in standard C.