or learn more

Great ideas all over the place

Aug 21, 2008


In developing Broccoli, I have turned up some extremely interesting language design principles that I would love to fold into Doris:



Clojure has a notion of sequences that allow different data structure to provide access as a logical list. The simplest example is to view a string as a sequence of characters where typical list operations (e.g. first, rest, cons, etc…) can be performed on its elements. I have started working that type of behavior into the CLIPS source, but it is slow going as the implementation of multifields, fact-bases, strings, and symbols are categorized as discrete types. Once I start digging into Numan, I will likely add a similar notion of the ISeq interface (with some extensions) to the base object hierarchy.


Objects as containers

I love the way that Javascript provides a simple mechanism for using objects as general-purpose containers. This allows one to add properties and functions to an instance at any time during execution. CLIPS allows us to add message handlers to classes at any time, but class slots (properties) can only be defined at the time of the class definition. I feel that providing a similar capability in Numan would be an enormous effort, but it is worth it.


Meta-object protocol

CLIPS can be said to have a fairly useful introspective MOP, but i have in the past found it disjointed. Aside from the way that (defmessage-handler) occurs outside of a class definition, COOL has not other real mechanism for providing intercession for objects. Likewise, there is an overall lack of intercession capabilities in CLIPS. Doris would be nicely served if it offered even a partially realized MOP along the lines of CLOS (as introduced in Andreas Paepcke’s paper User-Level Language Crafting – Introducing the CLOS Metaobject Protocol).


One Comment, Comment or Ping

  1. Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.

Reply to “Great ideas all over the place”