Gauche Devlog

< 0.9.9 is out | Next release will be 0.9.10 >


Remaining tasks for 1.0

In the last entry I listed a couple of items for 1.0. After that I remembered a few more, so I put them down here.

  • Enhancement of extended pairs. Currently we only use extended pairs to keep source information (source code location and the macro input). One big drawback of extended pairs is that it is costly to check if a given pair is extended (occupies 4 words) or not (occupies 2 words). Currently we need to look up the allocation region table to see the size of the object.
    If we can make the check faster, we can let modifiers (set-car! and set-cdr!) check if the pair has some special attributes (while cost of car and cdr stays the same.) It opens up a few interesting possibilities:
    • We can implement immutable pairs. Just raise an error in the modifiers.
    • We can implement typed lists, that is, a list whose elements are guaranteed to have certain type. A constructor, say, (typed-cons type car cdr) can check if car is of type and cdr is of type List type, and modifiers can check the type constraint.
  • Integrate pattern matcher into core. Most of my code now impors util.match. It's so fundamental and I think it should be supported as built-in.
    • An interesting possibility is to support pattern match in formal arguments by default.

Depending on how quick I can work on them, we might have another 0.9.x release.

Tag: 1.0

Post a comment