On Wed, Aug 26, 2009 at 08:54:55AM -0500, Slava Pestov wrote:
> On Wed, Aug 26, 2009 at 8:26 AM, Tom Schouten<[email protected]> wrote:
> > But, you're making me curious.
> > Is it possible to macro-translate Scheme into Factor?
> >
> > I assume the answer is yes as I think Factor has compatible lexical
> > scoping and tall calls.. So, did anyone do it already?
>
> While it is true that many Scheme features have Factor equivalents --
> lexical closures, mutable locals, tail calls -- some don't have a
> direct equivalent, for example nested procedures, or procedures
> defined in non-null lexical environments (for example, a let at the
> top level with a define inside).
>
I don't understand. Simplifying:
Is there an essential difference between Factor and say a Scheme subset
with only unary list->list functions, a `let' that can pop the stack
and bind a local variable and a `lambda' that creates list->list functions
and pushes them on the stack as a constant?
I.e. where this:
(lambda (stack)
(let ((a (car stack))
(stack (cdr stack)))
(cons (lambda (stack)
(cons a stack))
stack)))
would be the scheme code implementing this:
[| a | [ a ]]
following the syntax at:
http://factor-language.blogspot.com/2007/08/named-local-variables-and-lexical.html
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk