[<<][staapl][>>][..]
Wed Aug 13 09:14:46 CEST 2008

parameterized code

Context: writing a synchronous serial slave for the ICD2 programmer
protocol.  This involves code parameterized by 'clock' and 'data' pin
macros, and provides 'read' and 'write'.

It is time to properly tackle the problem I tried to solve with
loading different code modules into a namespace.  Currently, the only
way to introduce new bindings is to write parsing words.  These are
essentially prefix words that expand into arbitrary (prefixed) Forth
code.

I'm not entirely happy with:

  * 'load' into a shared namespace only works for 1 instance.

  * this pattern is too important to have it specified on top of the
    Forth prefix parser.

 Q: Is it possible to write down a simple solution in Scheme/Coma and
    translate this to a Forth prefix solution?



[Reply][About]
[<<][staapl][>>][..]