I tried call( and that worked. Here is the new list program 
(www.rosycrew.com/list.factor) for anybody that is interested. You may 
notice that I have a new word --- clone-list --- that clones a list. This 
just uses clone in a a simple and straightforward manner. So far it has 
worked for me in my slide-rule program. It may not work under more 
complicated usage --- I'm still pretty hazy in regard to the limitations of 
clone that we discussed earlier.

I like the call( word. This is way cool, as it is self-documenting. In Forth 
I would pass a cfa as I described, but I would have to put a comment 
somewhere nearby that described the stack effect of the anonymous word. This 
was never very clear. With your call(, the stack effect is documented right 
where I need it, and the compiler checks that everything corresponds. I'm 
starting to find some aspects of Factor that I like.

> Message: 8
> Date: Sun, 20 Sep 2009 12:59:52 -0500
> From: Slava Pestov <[email protected]>
> Subject: Re: [Factor-talk] a serious problem
> To: [email protected]
> Message-ID:
> <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Sun, Sep 20, 2009 at 11:25 AM, Hugh Aguilar <[email protected]> 
> wrote:
>> I upgraded as you requested and tried to also upgrade my software.
>> Previously, I had been allowed to pass quotations around on the stack, 
>> store
>> them in symbols and get them out again, and generally treat them as
>> first-class datums. Now I'm getting an error message that says: "Got a
>> computed value where a literal quotation was expected."
>
> Stack effect checking got stricter recently. Take a look at the call( 
> word:
>
> http://docs.factorcode.org/content/article-call.html
>
> Slava


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to