On Fri, 2009-09-18 at 15:44 -0700, Derick Eddington wrote:
> [...]
> I can see that a very limited set of programs could be transformed at
> expand time, but it seems like those that could wouldn't happen because
> they're silly programs.  E.g., in my notation, the program 
> (S 1 2 3 swap dup) could be transformed at expand time to (S 1 3 2 2).
> But why would anyone write a program like that?  

Thinking about it more, I realized that programs like 
(S 1 2 3 sum sum negate) might be written like that, instead of as 
(S -6), for notational reasons.  Just like you might write (- (+ 1 2 3))
in Scheme because for some reason you want it to be clear that it's 1,
2, 3, and addition involved, and Scheme compilers optimize such
expressions.  But I don't think I'm that interested in my stack-lang to
start getting into non-very-easy optimization techniques.  Maybe in the
long-term.  Thanks for the ideas, though.

-- 
: Derick
----------------------------------------------------------------

Reply via email to