Charles Childers


blog | parable | retro | ios apps | fountain pens


Parable: Improving Multi-Line Definitions

The core Parable language only supports evaluation of a single line of code at a time. The interfaces and VM functions provide some help in translating multiple lines into a single one, but it's a little clumsy and irritating to read.

Consider:

[ "nn-n" \
  dup * + \
] 'solve' :

The need for a trailing  is a bit annoying. forgetting this leads to errors, and it makes code harder to read. For the next release I wanted to resolve this.

My early attempt to deal with this proved very frustrating as the initial code was long and messy. I've iterated and refactored repeatedly, simplifying until I finally have something I'm comfortable with.

Currently this is partially in place. It will be fully supported in all implementations by the weekend.