Skip to content

Passerine 0.9.2 Release

Compare
Choose a tag to compare
@slightknack slightknack released this 02 Apr 11:33
· 244 commits to master since this release

Hey y'all! This is a fairly big release; I would make it a new minor version, but we've reserving 0.10 for a type-checker. This version adds support for variable hoisting, i.e. being able to reference other functions defined later from within a function without forward declarations:

-- before, we had to forward declare
loop = ()
loop = x -> loop x

-- now, this is automatic:
loop = x -> loop x

-- same thing for mutually recursive functions:
even = x -> odd x
odd = x -> even x

As always, we've included some nice error messages and such for when things go wrong. The semantics are pretty straightforward, and the implementation fairly efficient, so this doesn't require much overhead.

As an aside, this change also does variable renaming - it replaces each unique variable with a unique identifier; different variables with the same name will have a different unique identifier. This representation opens the gates for type-checking, which requires that symbols be consistently named.

Have a nice day!