Deutsch English Français Italiano |
<2024Sep22.191342@mips.complang.tuwien.ac.at> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.lang.forth Subject: Re: single-xt approach in the standard Date: Sun, 22 Sep 2024 17:13:42 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 47 Message-ID: <2024Sep22.191342@mips.complang.tuwien.ac.at> References: <vcbn5e$3etuk$1@dont-email.me> <1a3ebf77c1ed8926d455a268e1309fe0@www.novabbs.com> <vcbuog$3etuk$3@dont-email.me> <66ee34a2$1@news.ausics.net> <vcmbf2$1ifml$1@dont-email.me> <66ef7dc7$1@news.ausics.net> <vcpi98$25spg$1@dont-email.me> Injection-Date: Sun, 22 Sep 2024 19:25:58 +0200 (CEST) Injection-Info: dont-email.me; posting-host="511b646e4025f96132525e6ac5a52b4b"; logging-data="2410045"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NqXYXkNNEPjT0+ZOHdU45" Cancel-Lock: sha1:TGwAIl3iPUaxTdS3wO08yJzjjyU= X-newsreader: xrn 10.11 Bytes: 2717 Ruvim <ruvim.pinka@gmail.com> writes: >- All standard programs are single-xt programs (in the part of >user-defined words). Why we should remove the way to document this >programs/words in the standard terms of interpretation semantics, >compilation semantics and execution semantics? Who proposes removing that? I often write about the interpretatation and compilation semantics of various words with default compilation semantics or with immediate compilation semantics, and I see nobody who wants to remove that possibility. Examples: : foo 1 ; The execution semantics of FOO are to push 1 on the data stack. The interpretation semantics of FOO are to push 1 on the data stack. The compilation semantics of FOO are append the execution semantics of FOO to the current definition. : bar state @ ; immediate The execution semantics of BAR are to push the contents of STATE on the data stack. The interpretation semantics of BAR are to push the contents of STATE on the data stack. The compilation semantics of BAR are to push the contents of STATE on the data stack. With that we can then determine what code like : bla postpone bar ; immediate bla . \ prints 0 ] bla [ . \ prints -1 should do; I show the output in comments. I just tested gforth, iforth, SwiftForth, and VFX Forth, and unsurprisingly they all produce the output shown in the comments. - anton -- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: https://forth-standard.org/ EuroForth 2024: https://euro.theforth.net