Re: [stack] function/object ambiguity + quotation alternative
"Adam" <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
John,
Are you aware of the word execute
(http://docs.factorcode.org/content/word-execute,words.html)?
If I understand Chris, the current call/execute distinction reveals your
problem but I'm not sure.
( scratchpad ) 5 { dup } first execute . .
5
5
( scratchpad ) 5 { dup } >quotation call . .
5
5
( scratchpad ) 5 [ dup ] first execute . .
5
5
( scratchpad ) 5 [ dup ] call . .
5
5
( scratchpad ) 5 \ dup execute . .
5
5
-Adam
--- In [email protected], Chris Double <chris.double@...>
wrote:
>
> On Fri, Feb 27, 2009 at 9:25 AM, Stevan Apter sa@... wrote:
> > if i can remember what i was thinking at the time, it was
> > something like this: i want to be able to put naked functions
> > on the stack. but i also want to be able to evaluate them
> > once they're there. so reinterpret 'i' to mean 'move to the
> > queue'.
>
> This is one of the features I like about XY.That function objects are
> executable using 'i' just like quotations. It's a feature that has
> been discussed to be added to factor occasionally, that of making word
> objects callable (ie. make call a generic that works on quotations and
> words).
>
> Chris.
> --
> http://www.bluishcoder.co.nz
>