Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: POSTPONE behaviour Date: Thu, 26 Nov 2015 05:20:08 -0500 Organization: Aioe.org NNTP Server Lines: 51 Message-ID: References: <49eeaf16-5bdf-449c-8278-59e2bb992441@googlegroups.com> <7f06c60a-bc63-4aa3-adfc-877972fa9120@googlegroups.com> <98a20b8e-3531-4d97-9fbb-f16216edca0d@googlegroups.com> <86vb8qv9be.fsf@vps34351.public.cloudvps.com> <91b7cce8-9779-4ab4-84bf-6f4b04115189@googlegroups.com> <29d96442-5161-4d80-ae1a-5592f9509389@googlegroups.com> NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:43823 On Thu, 26 Nov 2015 02:42:48 -0500, Gerry Jackson wrote: > On 26/11/2015 06:11, Raimond Dragomir wrote: >>> When the compiler encounters POSTPONE IF in a definition it doesn't >>> cause the compilation semantics of IF to be executed, it compiles some >>> code that causes the compilation semantics of IF (i.e. IF's special >>> compilation semantics) to be executed when its enclosing definition is >>> called in a later definition. >>> >>> When the compiler encounters POSTPONE DROP in a definition it doesn't >>> cause the compilation semantics of DROP to be executed, it compiles some >>> code that causes the compilation semantics of DROP (i.e. default >>> compilation semantics) to be executed when its enclosing definition is >>> called in a later definition. >>> >>> Apart from the bit in parentheses and the words IF and DROP, what's the >>> difference? >> >> The big difference is that postpone postpones the EXECUTION of immediate >> words and postpones the COMPILATION of non-immediate words. >> >> Just trying to implement postpone and you will get the big difference. >> Postponing EXECUTION of immediate words is very simple, just compile the >> word like it is non-immediate. Postponing the COMPILATION of a word is not >> like that. >> > > That's the system implementer's problem. The user doesn't care when > postponing words, that's what I'm talking about. Look at Bernd Paysan's > examples. > Programmers need to understand what something does to use it. Without understanding immediacy in an interpreted Forth, and what COMPILE and [COMPILE] do, and seeing an implementation of POSTPONE, you probably won't grasp that POSTPONE is a poorly named, universal compile. How else does someone grasp the duality of POSTPONE without understanding immediacy? Without the background, POSTPONE is a magical black box. If all you know about is POSTPONE , then what would do you do for the rare few instances where POSTPONE won't work? I think the established Forth programmers probably have a solid foundation to work from based on history, whereas newer programmers don't. Rod Pemberton -- How to kill Facebook. Tell a bunch of fourth graders that only old people use Facebook. Wait eight years.