Future Schemes


Welcome back! I hope you've had the chance to try out Schemer. Implementing a scripting language has been a really eye opening experience and has definitely given me a new appreciation for the currently available scripting languages. This devblog will go over some future plans that I have for my Scheme implementation. I'll cover some Scheme specific feature that I think will be important to implement and then I'll conclude by touching on next steps related actually integrating Scheme into a game environment. So without further ado:


An include special form

Adding this special form would allow for sharing of functionality between scheme files. This sharing would facilitate building more complex systems within Scheme by allowing code to be organized for reuse. Similar to C++, I suspect some mechanism for guarding against including the same file multiple times will also need to be added.


Manipulation of lists and strings

While Schemer allows you to create lists and strings, you are currently not able to modify their contents after creation. The main reason why manipulation was left out of Schemer is because it scratches the surface of a larger problem: memory management (i.e. how an application manages the memory that it receives from the operating system). Many scripting languages address memory management by implementing some form of garbage collection to recycle resources that are no longer being actively used. I chose to defer implementing garbage collection functionality in order to ensure I had a firm grasp of the problems I needed to solve.


Accessing elements in a list

At first glance accessing elements in a list seems pretty straightforward; however, I opted to delay implementing this feature because it also touched on memory management. In particular, care must be taken to ensure that the lifetime of the retrieved elements is managed appropriately.


So those are the main Scheme specific features that I think will be important to address going forward. Another big piece of the puzzle is defining how a game should interact with Scheme (after all, that is the end goal). This is an area that I've been actively thinking about and my hope is to use my next game to start fleshing it out. I already plan to implement a layer to help manage Scheme scripts and environments, but I'd like to spend more time formalizing how C++ and Scheme should interact.

As you can see, there's still a fair amount of post Schemer work to do, but as they say, "Rome was not built in a day."

Get Schemer

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.