Up to this point, the foreign function system did not allow using callbacks via Engine::runFunctionObject() until after Engine::execute() or Engine::run() (which calls Engine::execute()) had completed. My recent update changes that and makes recursive execution of opcodes easier.
Back at it again, this time I’ve made some important bug fixes that have laid hidden since branch Cheetah. Uh oh. Sometimes a bug can be simply reference counting too much, in which case, we call it a memory leak. The major issue, however, was a parsing bug that duplicated variable address names. Hard to believe I missed something as important as that, but it required a certain state of the parser, so I don’t feel quite as bad about missing it. In any case, those are done.
A number of things have changed with regards to the internals. A great deal of time has been spent trying to optimize the engine, resulting in some interesting discoveries.
Lists are tuples are very common features for languages. Arrays and lists have been around for some time, so they are almost expected. Python does away with arrays, understandably so, and it almost makes little sense to keep they around for Copper. Tuples, on the other hand, seem primarily for mental models, but can be useful in preventing misuse and accidental deletions or additions of elements as well as providing convenient means for extraction. They sort of fill the gaps for simplicity that lists, arrays, and general objects don’t fill. Both of these should be discussed in detail.