Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: does VFX have the same bug as Gforth? Date: Tue, 26 Aug 2014 07:36:11 -0400 Organization: Aioe.org NNTP Server Lines: 46 Message-ID: References: <2014Aug19.111459@mips.complang.tuwien.ac.at> <2014Aug19.173925@mips.complang.tuwien.ac.at> <2014Aug20.094606@mips.complang.tuwien.ac.at> <2014Aug22.171358@mips.complang.tuwien.ac.at> <2014Aug23.091548@mips.complang.tuwien.ac.at> <53fb3736.195424542@news.demon.co.uk> NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.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:33071 On Mon, 25 Aug 2014 10:15:41 -0400, Stephen Pelc wrote: > On Sun, 24 Aug 2014 03:51:25 -0500, Andrew Haley > wrote: >> Bernd Paysan wrote: >> If I want to use [COMPILE] I need to know if a word is immediate. So, >> it's impossible to use [COMPILE] on system-supplied words in a >> portable program. I must use POSTPONE for that. I may use [COMPILE] >> on my own words, though. > > As the VFX experience shows, it's actually worse than that. There's a > disconnect between "traditional" Forth and ANS Forth. Traditional > Forths assume a conceptually very simple interpreter/compiler loop. > I like that model and believe that it should be preserved. It's > part of the essence of Forth. > > [...] > The ANS definition of [COMPILE] does not mention immediacy. Instead > it talks about "default compilation semantics". The implied "default > compilation semantics" are given by section 3.4.3.3 in Forth2012. > > [...] > In practice, the only way of marking a word as having "non-default > compilation semantics" is with IMMEDIATE. There are very, very few > standard words that must be immediate. Now that various Forths > (not just VFX) have techniques to introduce "non-default compilation > semantics" without using IMMEDIATE, we need a standard way to indicate > to a compiler that a word has "non-default compilation semantics". > > Perhaps we should introduce N-DCS. I can see another header flag > coming on ... > What about two immediate flags? One would be for "Compilation:" and the other for "Execution:". IMMEDIATE would default to setting the flag for "Compilation:", but both would be used to determine immediacy of a word, i.e., logically OR'd. DOES> and ( appear to be the only CORE words that would get both. Other words with interpretation semantics that seem to have unlisted compilation semantics, may need both too, e.g., : CREATE CONSTANT VARIABLE. Rod Pemberton