Attila's Blog

About writing your own programming language in C, Go and Swift

The theoretical background of hash maps

Sep 2, 2019 Comments

Categories: aspl
Tags: hash maps

It is time to be able to use variables in ASPL, but at the moment we have a problem that prevents us doing so. Creating and using variables means to store their values somewhere, attach a name to them so we can look them up later. Right now we do not have any means to do this. This is where hash maps can help us. As C does not have hash maps built–in, we will have to implement one by ourselves. Let’s see the theory behind hash maps that we will use later to implement a hash map on our own.

Implementing strings

May 12, 2019 Comments

Categories: aspl
Tags: strings

Last time we modified ASPL’s core to add boolean expression support, that means our VM currently supports numbers (double and integer), booleans (true, false) and nil. It is time to tackle an important challenge and add string support as well. Let’s see how.