Matthias Trute <mtr...@web.de> writes:

> Hi Enoch,
>
> Only one remark so far.
>
> You defined the scope stack effect as ( addr len -- addr len wid )
> Usually forth follows the conecpt, that a word consumes its parameters
> to generate the new data. I'd prefer to keep this idea as the general
> design pattern. That changes  scope to the stack effect (addr len -- wid )
> That requires a few more instructions (a 2DUP in (CREATE) and the get-current
> needs some glue code to be usable as a scope provider. Nothing really big, I 
> think.

Hello Matthias,

You are absolutely correct, Leo Brodie writes in 4.16 "Tip: Let
definitions consume their arguments", but I have the feeling that he
would have said (*) but you can igone this advice if it adds uncessary
cruft to your code :-)

(*) Since I don't believe that he would advocate against the KISS
principle.

> Your scope example turns to something like
>
>  : scope ( addr len -- wid)
>     drop c@ [char] _ =  if
>        _private
>     else
>        get-current 
>      then ;
>
> (not tested)
>
> The standard scope provider that uses GET-CURRENT will be
>
> : current-scope drop drop get-current ;
>
>> P/S If you approve of this patch I suggest submission of an RfD to
>> forth200x.org.
>
> You're a brave man ;)

I think that their standards committee gives too much voice to guys from
the PC era while Forth "is born" for the small µC in mind.

Regards, Enoch.


------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to