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


Groups > comp.lang.forth > #13489

Re: How to use the "compile," word

From Bernd Paysan <bernd.paysan@gmx.de>
Newsgroups comp.lang.forth
Subject Re: How to use the "compile," word
Date 2012-07-03 22:42 +0200
Organization 1&1 Internet AG
Message-ID <jsvlgj$ihh$1@online.de> (permalink)
References (1 earlier) <7f1f48a4-8c78-43e1-8c5f-92b185382564@f16g2000yqg.googlegroups.com> <jsq2lo$s0m$1@online.de> <2012Jul2.185409@mips.complang.tuwien.ac.at> <jssra7$vk5$1@online.de> <2012Jul3.180933@mips.complang.tuwien.ac.at>

Show all headers | View raw


Anton Ertl wrote:
> Yes, it's the compilation (what do you mean with compile-time in this
> context?) counterpart of EXECUTE and that means that it can be defined
> as
> 
> : compile, ( xt -- ) postpone literal postpone execute ;
> 
> Where do you get the idea that it was envisioned as anything else?

[x] You didn't read Mitch Bradley's message on the Forth200x mailing 
list.  Mitch describes clearly for what it was envisioned, and you still 
ignore this.

I think this discussion with you leads nowhere.

If you want "postpone literal postpone execute", do so.  That's not what 
COMPILE, is meant for - read the mentioned mail from Mitch Bradley, the 
author of the COMPILE, proposal in Forth-94.  COMPILE, is the API to 
compile non-immediate words referenced by xts.  The reason why it is 
specified as it is is that in classical Forth implementations words have 
either a default compilation semantics *or* they are immediate, in which 
case their compilation semantics is invoked by EXECUTE.  In a classical 
threaded code system, you use , to do the job of COMPILE,.  COMPILE,s 
job is information hiding, and the standard does not mandate that words 
with special compilation semantics have to be immediate.  That's the 
purpose of declaring semantics instead of flagging words with "I" and 
"C".  And no, we don't have to invent a new word to get the compilation 
semantics of xts from non-immediate words, Mitch Bradley already did: it 
is called COMPILE,.

The idea that a word called *COMPILE,* is there to explicitly access 
*interpretation* semantics is mind-boggling.  Just because someone 
rushed in a late proposal, you say we should stick to its mistakes?  For 
operations on words with special compilation semantics, which are really 
rare, and a user can't define them himself by using standard words?

According to your argument, access to the interpretation semantics of S" 
(which is easily done by ['] S" EXECUTE, so no extra words necessary) 
using COMPILE, is more important than the ability to write your own text 
interpreter (because monotoken systems should invent a new word for 
this).  I think you should consider to adjust your priorities.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

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


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