One of the features I had been meaning to get around to for some time was improvements to the logging. The original system had one enum value per error. It gets quite tedious pretty quickly when you have to write out redundant messages with only a single word changed. Since it would be nice to have the messages be localized (i.e. translated into different languages), I used an enum, but obviously, I needed to shorten the process.
The result of my long evening of work was a rewrite of part of the logging system that resulting in an easily extensible interface for which I created pretty print logging (which you can see in the feature image of this post).
Continue reading “log(improvements)”
That recent change I made to speed up the processing also revealed a bug that occurred whenever a function scope was resized. This led to an overhaul of the variable storage system that may or may not have been necessary but will speed things up anyways because there are fewer function calls to make.
At the same time, I’ve decided to change some language semantics. Previously, when assigning data (such as a number) to a variable, the original function was retained, but the return was now a “constant return”. This meant that calling the function on the variable would return this “constant return” rather than the function, yet the members of the original function were still accessible. This “constant return” feature was originally designed to be a shortcut, but, ironically, it goes against the intended language design because this syntactic sugar was actually intended to be a shortcut for creating a new function. Now it will be.
Continue reading “Progress Report #8”
I do love languages, and (as I wrote in my very first post on this blog) Copper has its origins in Goldfish, a language initially intended for AI. In a way, making a language was still on the bucket list, so the things I said in that post are not lie, but there is more to the story.
Continue reading “The Birth of Copper”