Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #135181

Re: Naming issues in create-does (was: Back to the Forth Virus)

Path csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From peter <peter.noreply@tin.it>
Newsgroups comp.lang.forth
Subject Re: Naming issues in create-does (was: Back to the Forth Virus)
Date Sat, 13 Jun 2026 20:21:58 +0200
Organization A noiseless patient Spider
Lines 64
Message-ID <20260613202158.0000283a@tin.it> (permalink)
References <11069n1$3617t$1@dont-email.me> <n8ovvoF8afcU1@mid.individual.net> <110bgsa$mivq$1@dont-email.me> <n8v8aoF7qb6U1@mid.individual.net> <2026Jun11.192802@mips.complang.tuwien.ac.at> <110hfag$2bsrn$1@dont-email.me> <2026Jun12.195246@mips.complang.tuwien.ac.at>
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
Injection-Date Sat, 13 Jun 2026 18:22:00 +0000 (UTC)
Injection-Info dont-email.me; logging-data="3198404"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RKu/+MGoK1mSuDXJBjxlLT+JbsAdaNVA="; posting-host="75b9c1b55ead681bd45ba655ade15613"
Cancel-Lock sha1:IsBvNfrg07WXYD4aOcSMMdc9OOc= sha256:etYPuXYtK0JX4xSZcP9ji5Fnkqqhwqaoi30VICq6Xlk= sha1:iRn+sZ4AV8nq7++0VC6JYPoWvro=
X-Newsreader Claws Mail 4.4.0 (GTK 3.24.51; x86_64-w64-mingw32)
Xref csiph.com comp.lang.forth:135181

Show key headers only | View raw


On Fri, 12 Jun 2026 17:52:46 GMT
anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:

> Ruvim <ruvim.pinka@gmail.com> writes:
> >On 2026-06-11 17:28, Anton Ertl wrote:
> >> minforth <minforth@gmx.net> writes:
> >>> : FCONSTANT  \ ( f 'name' -- |r -- f) 12.6.1.1492 fp-number constant
> >>>     create f, ['] f@ _<does ;
> >> 
> >> The word that you call _<does is called SET-DOES> in Gforth
> >
> >In the name `does>`,  the symbol `>` means that the following code up to 
> >';' is a part of the semantics of the recent child of `create` (not the 
> >containing definition).
> >
> >In the name "set-does>" the symbol ">" is misleading.
> 
> Yes.  But given that Forth and Gforth continues to have DOES>,
> SET-DOES> makes it clear to which word it is related.  And I also find
> it easier to remember that the spelling of DOES> does not differ
> between DOES> and SET-DOES>.
> 
> >The name '_<does' is also strange.
> 
> Given the explanation for the ">" in DOES>, <DOES points in the
> direction where the xt should be pushed on the stack.  It's not clear
> to me why minforth prepended a "_".
> 
> >Why not simply choose the name `set-does`?
> 
> Different spelling of the "DOES>" part.
> 
> >Or, even better, `set-latest-doer` ?
> 
> Even more different.  Gforth contains a number of words that change
> the latest word, and they all start with SET-, not with SET-LATEST-
> (one might see it as a problem that there are words that do not change
> the latest word and that have also names starting with SET-).  And the
> spelling of DOES> is even more different.  Plus, we (at least in
> Gforth source code, maybe also elsewhere) call run-time routines like
> DOCOL DOCON DOVAR and DODOES doers, so I would expect that
> SET-LATEST-DOER does what SET-EXECUTE does, not what SET-DOES> does.
> 
> Overall, SET-DOES> is unambiguous and good enough.

In LXF64 I have SET-DOES>. It came out as a part of DOES> and I took 
the name from GFORTH. I like the name!

IN LXF64 SET-DOES> rewrites the last definition and compiles the xt.
If the xt point to a macro it will be inlined. This means that 
SET-DOES> not only works with CREATE but all definitions that start
with a literal. Like constant, variable, value, defer, and any
colon definition that starts with a literal!

The DOES> part of a definition is compiled as a separate :noname word
Also that can be a macro!

BR
Peter

 
> - anton

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Back to the Forth Virus clv2020 <clv2020@vodafonemail.de> - 2026-06-08 13:40 +0200
  Re: Back to the Forth Virus Jan Coombs <jan4etsept@murray-microft.co.uk> - 2026-06-08 13:16 +0100
  Re: Back to the Forth Virus Ruvim <ruvim.pinka@gmail.com> - 2026-06-08 12:23 +0000
    Re: Back to the Forth Virus Daniel Cerqueira <dan.list@lispclub.com> - 2026-06-08 13:56 +0100
      Re: Back to the Forth Virus anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-06-08 15:40 +0000
        Re: Back to the Forth Virus Daniel Cerqueira <dan.list@lispclub.com> - 2026-06-08 19:26 +0100
          Re: Back to the Forth Virus anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-06-08 20:06 +0000
        GForth reproducible builds (was Re: Back to the Forth Virus) Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-02 14:40 -0300
  Re: Back to the Forth Virus minforth <minforth@gmx.net> - 2026-06-09 01:01 +0200
    Re: Back to the Forth Virus clv2020 <clv2020@vodafonemail.de> - 2026-06-10 13:13 +0200
      Re: Back to the Forth Virus minforth <minforth@gmx.net> - 2026-06-11 10:01 +0200
        Re: Back to the Forth Virus anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-06-11 17:28 +0000
          Naming issues in create-does (was: Back to the Forth Virus) Ruvim <ruvim.pinka@gmail.com> - 2026-06-12 17:23 +0000
            Re: Naming issues in create-does (was: Back to the Forth Virus) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-06-12 17:52 +0000
              Re: Naming issues in create-does (was: Back to the Forth Virus) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-06-12 18:22 +0000
                Re: Naming issues in create-does dxf <dxforth@gmail.com> - 2026-06-13 13:14 +1000
                Re: Naming issues in create-does Ruvim <ruvim.pinka@gmail.com> - 2026-06-13 06:33 +0000
                Re: Naming issues in create-does dxf <dxforth@gmail.com> - 2026-06-13 22:20 +1000
                Re: Naming issues in create-does Ruvim <ruvim.pinka@gmail.com> - 2026-06-13 15:55 +0000
                Re: Naming issues in create-does Ruvim <ruvim.pinka@gmail.com> - 2026-06-15 13:08 +0000
                Re: Naming issues in create-does Hans Bezemer <the.beez.speaks@gmail.com> - 2026-07-23 19:58 +0200
                Defining words in more than one step (was: Naming issues in create-does) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-06-13 06:46 +0000
                Re: Defining words in more than one step dxf <dxforth@gmail.com> - 2026-06-14 12:29 +1000
              Re: Naming issues in create-does Ruvim <ruvim.pinka@gmail.com> - 2026-06-12 19:59 +0000
                Re: Naming issues in create-does anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-06-13 10:25 +0000
                Re: Naming issues in create-does Ruvim <ruvim.pinka@gmail.com> - 2026-06-13 15:30 +0000
                Re: Naming issues in create-does anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-06-13 17:30 +0000
              Re: Naming issues in create-does (was: Back to the Forth Virus) peter <peter.noreply@tin.it> - 2026-06-13 20:21 +0200
  Re: Back to the Forth Virus dxf <dxforth@gmail.com> - 2026-06-09 12:14 +1000
    Re: Back to the Forth Virus "Kerr-Mudd, John" <admin@127.0.0.1> - 2026-06-10 18:54 +0100
      Re: Back to the Forth Virus dxf <dxforth@gmail.com> - 2026-06-11 16:32 +1000
        Re: Back to the Forth Virus "Kerr-Mudd, John" <admin@127.0.0.1> - 2026-06-11 14:20 +0100
  Re: Back to the Forth Virus Stephen Pelc <stephen@vfxforth.com> - 2026-06-09 10:22 +0000
    Re: Back to the Forth Virus clv2020 <clv2020@vodafonemail.de> - 2026-06-10 15:55 +0200
  Re: Back to the Forth Virus albert@SPENARNC.XS4ALL.NL - 2026-07-24 13:35 +0200

csiph-web