Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #13450
| From | Bernd Paysan <bernd.paysan@gmx.de> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: How to use the "compile," word |
| Date | 2012-07-02 22:44 +0200 |
| Organization | 1&1 Internet AG |
| Message-ID | <jst16t$i30$1@online.de> (permalink) |
| References | (1 earlier) <7f1f48a4-8c78-43e1-8c5f-92b185382564@f16g2000yqg.googlegroups.com> <jsq2lo$s0m$1@online.de> <c576a3b2-b02a-4190-a4ef-90744d22fefe@t8g2000yqd.googlegroups.com> <jsqlru$rpp$1@online.de> <536bde94-fe78-438c-a3b0-e367ffd5c6e6@d6g2000vbe.googlegroups.com> |
BruceMcF wrote: >> You get the interpretation semantics of S" with ['] S" EXECUTE. You >> get the compilation semantics with ['] S" COMPILE,. > > So IOW, what you get is wrong. ['] S" should certainly give the same > behavior whether executed immediately or compiled for later execution. Which leaves, as implementation options, one choice: dual-xt FIND. As state-smart is ruled out, too. >> If we follow the ANS Forth standard literally, like Anton does, we >> have to come to the conclusion that the only standard-compliant >> system is the one where FIND returns two different tokes depending on >> STATE. > > When it tried the code in gforth it worked. Yes, because Gforth's way to solve this particular problem is implemented by Anton, and therefore follows Anton's interpretation. I'd rather like to go the intelligent COMPILE, way, but that would result in a fork of Gforth - and since we use CVS, forking is not a good option (ok, I could use git for the fork). I prefer to find a consense with Anton, even when it is difficult. In the long run, this is a much better way to collaboratively develop software. And trust me, Gforth is a long-running project, it is about to celebrate it's 20th birthday. > For ' and ['] what FIND returns is neither here nor there ~ ' and ['] > should return something that gives the interpretation behavior. With EXECUTE. ' foo EXECUTE is equal to foo in interpretation state. The execution semantics in the standard is defined so inconsistently that *this* is the thing you can actually trust. I'd say if a word has default compilation semantics, you can trust in COMPILE, to result in the behavior you actually expect. So far, I've not seen any real-world examples of COMPILE, except the definition of POSTPONE which violate this rule (they all apply to words with default compilation semantics). -- Bernd Paysan "If you want it done right, you have to do it yourself" http://bernd-paysan.de/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to use the "compile," word teammember0x01@gmail.com - 2012-06-30 16:21 -0700
Re: How to use the "compile," word BruceMcF <agila61@netscape.net> - 2012-06-30 16:53 -0700
Re: How to use the "compile," word Coos Haak <chforth@hccnet.nl> - 2012-07-01 02:06 +0200
Re: How to use the "compile," word BruceMcF <agila61@netscape.net> - 2012-06-30 19:11 -0700
Re: How to use the "compile," word Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-01 19:50 +0200
Re: How to use the "compile," word "Elizabeth D. Rather" <erather@forth.com> - 2012-07-01 08:40 -1000
Re: How to use the "compile," word Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-01 23:14 +0200
Re: How to use the "compile," word BruceMcF <agila61@netscape.net> - 2012-07-01 15:38 -0700
Re: How to use the "compile," word Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-02 01:18 +0200
Re: How to use the "compile," word anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-02 17:03 +0000
Re: How to use the "compile," word Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-02 21:39 +0200
Re: How to use the "compile," word anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-03 16:55 +0000
Re: How to use the "compile," word Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-03 23:09 +0200
Re: How to use the "compile," word BruceMcF <agila61@netscape.net> - 2012-07-02 12:00 -0700
Re: How to use the "compile," word Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-02 22:44 +0200
Re: How to use the "compile," word Josh Grams <josh@qualdan.com> - 2012-07-02 20:18 +0000
Re: How to use the "compile," word Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-02 22:53 +0200
Re: How to use the "compile," word anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-02 16:54 +0000
Re: How to use the "compile," word Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-02 13:05 -0500
Re: How to use the "compile," word anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-03 16:08 +0000
Re: How to use the "compile," word Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-03 14:35 -0500
Re: How to use the "compile," word Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-02 21:03 +0200
Re: How to use the "compile," word anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-03 16:09 +0000
Re: How to use the "compile," word Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-03 22:42 +0200
Re: How to use the "compile," word "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-07-01 04:39 -0400
Re: How to use the "compile," word Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-01 04:03 -0500
Re: How to use the "compile," word Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-01 11:48 +0000
Re: How to use the "compile," word Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-07-02 20:46 -0700
csiph-web