Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #135178
| From | Ruvim <ruvim.pinka@gmail.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Naming issues in create-does |
| Date | 2026-06-13 15:30 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <110jt22$316gn$1@dont-email.me> (permalink) |
| References | (4 earlier) <2026Jun11.192802@mips.complang.tuwien.ac.at> <110hfag$2bsrn$1@dont-email.me> <2026Jun12.195246@mips.complang.tuwien.ac.at> <110hof1$2ermk$1@dont-email.me> <2026Jun13.122538@mips.complang.tuwien.ac.at> |
On 2026-06-13 10:25, Anton Ertl wrote: > Ruvim <ruvim.pinka@gmail.com> writes: >> On 2026-06-12 17:52, Anton Ertl wrote: >>> 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. >> >> I see. In that case, since Gforth already has `DODOES` (rather than >> `DODOES>`), the name `SET-DOES` seems more appropriate. > > There is no Forth word DODOES in Gforth. Howerver, there are the > following documented (i.e., supported) words that contain "DOES", with > the line numbers where they occur in the source code of the manual. > > 9061: does> > 9103: set-does> > 9620: const-does> > 18986: dodoes: > 18998: >does-code > 19003: does-code! > > An early occurence indicates that the word is more foundational and > more generally useful, while a late occurence indicates a word that > may be useful in specific places. > > The documentation for the latter three words is: > > 'dodoes:' ( - addr ) gforth-0.6 "dodoes-colon" > The code address of a 'DOES>'-defined word. What does the colon at the end mean? I would hide that word in the attic and not show it to anyone ;-) > > '>does-code' ( xt1 - xt2 ) gforth-0.2 "to-does-code" > If xt1 is the execution token of a child of a 'set-does>'-defined > word, xt2 is the xt passed to 'set-does>', i.e, the xt of the word that > is executed when executing xt1 (but first the body address of xt1 is > pushed). If xt1 does not belong to a 'set-does>'-defined word, xt2 is > 0. > > 'does-code!' ( xt2 xt1 - ) gforth-0.2 "does-code-store" > Change xt1 to be a 'xt2 set-does>'-defined word. > > So if we would rename, then we would probably introduce DODOES>:, > >DOES>-CODE and DOES>-CODE! and declare the other words obsolete. > Maybe we will, but for now there is no desire to go there. The names `defer@` and `defer` follow a well known naming convention and look far better than `>does>code` (although I don't like the "defer" part in them). One option that I consider is to introduce an artificial noun, such as "codedoes", and use it in names as follows: codedoes! ( xt2 xt1 -- ) codedoes@ ( xt1 -- xt2|0 ) set-codedoes ( xt2 -- ) set-latest-codedoes ( xt2 -- ) -- Ruvim
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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