Today (well, actually, yesterday. I just forgot to write this until just now), i did three things in the
sandwich development process.
the first thing i did was make the separator a
\n instead of a space. because of this change, you can now print strings with spaces in them. for example, to print “Hello, world!” in the previous version, you had to do this:
but they would actually print on separate lines. this is not what i wanted, so i changed it to look like this:
subsequent instructions would go on their own lines, rather than being next to other instructions.
explicit variable calls and comments
before, variables would get automatically get converted. however, this can be very annoying. this is what it looked like:
but what if you wanted to print
h? you’d have to set the variable
h to be
h, then print it out, then set it back to what it was before. to combat this, i’ve changed this to look like the following:
variables are now denoted by a
$ before its name.
i also added comments, which can be used like so:
pHello, world! # the interpreter will skip the next line (and this line) #pThis will not print
readme, license, code comments
i added a readme and a (un)license, so newcomers will know how to use the language. i also added comments to the code, so people readding the source code can tell what each peice of code does.
as always, please try to contribute to sandwich by sending a patch to my email or making a pull request on tildegit. instructions are in the README.