Repository navigation
Road Map
Currently, the language is implemented as a static interpreter that lexes, parses, and evaluates source code. Some portability is offered in this interpreter being written in the C programming language, though it would be more ideal if the codebase were completely ANSI compliant. Alternatively, there is a minimal JavaScript implementation of the interpreter that is almost a 1-1 copy of the C code.
There are more than a few new features to implement. Mostly, these are overhauls in terms of adding syntax and new language semantics. Exceptions change the way that errors are checked. Operator-overloading increases the complexity of some evaluations. Adding user types may pose some challenges in determining exactly how that should be handled. Expanding the standard library would be wonderful, but it might make more sense to stabilize the language first and provide easier mechanisms for interfacing libraries. If the project were written in C++, it might be easier to have templates, macros, or features that ensure memory safety, but for now it requires knowledge of how the internal garbage collector works.
Some helpful features might be a debugger, either command-line or graphical, and some sort of IDE or even simple syntax highlighting for an editor. Improving debug output is another goal. Working out all of the kinks with basic programming features would be good, too, like having a clear description of how dictionary types should behave and what the differences between arrays, dictionaries, and object references are.
In order to speed-up the runtime for Duck programs, improve the ability to execute code across other platforms or cross-compile programs, and improve the logic of the language's implementation, it may prove necessary to drastically redesign the interpreter's architecture.
As an imperative language, it was relatively easy to get the Duck interpreter off the ground from the beginning. The program's execution context is stored in a relatively small number of global variables, one or two variables are kept for the current state, and instructions are recursively called in the program, keeping local state information on the stack.
This presents problems, however, not just in limiting the functionality of the language to an imperative paradigm, but also in performance and limitations to what programs can be run. A program with an excessive amount of recursion will trigger a stack overflow and crash and this will happen much sooner than it has to in the worst case.
Instead of iterating through the program source as part of an abstract syntax tree, it would be much better to artificially extract the logic of each different "instruction" into a global state that uses its own internal stack and record keeping. Then it would be simple to use trampolining to tighten the main loop of execution. If all different function calls must begin and end in a trampoline, then it is easier to implement things like callbacks and exception handlers which derail the current state of execution. Even more ideal would be to write the runtime environment in a continuation passing style. Not only would this be a higher-level model of execution--it would also allow for advanced instructions like call-with-current-continuation.
What we want in the future is a standalone language that can be used either in a contained environment, like the interpreter, or where programs can be linked and executed on their own. Adding features for optimization would be a next-step down this road, after working to compile programs to executables, but even generating bytecode for a virtual machine would be one step closer.

Duck Programming Language