Maybe the dsl aspect could be viewed as applying a layer of sugar to the
stack based workhorse.  You could easily have 'adjectives' that accumulate
into a variable, not on the stack, then a noun word that takes those options
and does the work.  This is how I accumulate attributes for the HTML
elements, and it feels like a dsl:

"Save" button <>submit
        "org" id
        <>form +content

button puts save into an attribute variable
<>submit uses (and clears) that variable, appends to the working collection
id puts "org" in the same place that button put things before
<>form uses the all-id variable to set attributes as it wraps what's on the
stack
+content puts it away somewhere.

This, I think, works fine for a dsl.  It also works fine if the 'attribute
value' is a field of an object on the stack, and the stack throughout this
is
( page-assembly current-chunk xx -- page-assembly current-chunk )
or sometimes going down to
( page-assembly current-chunk  -- page-assembly )

Using vocabularies, you could even keep an internal and an external version
of the word, where the stack one works faster, the other is the DSL.
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to