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


Groups > comp.lang.forth > #40881 > unrolled thread

RfD: Quotations

Started by"Alex McDonald" <blog@rivadpm.com>
First post2015-07-28 21:22 +0100
Last post2015-08-01 15:15 -0700
Articles 20 on this page of 114 — 15 participants

Back to article view | Back to comp.lang.forth


Contents

  RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-28 21:22 +0100
    Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-29 07:35 +0000
      Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 14:20 +0100
    Re: RfD: Quotations Ron Aaron <rambamist@gmail.com> - 2015-07-29 13:44 +0300
      Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 13:42 +0100
    Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-29 05:35 -0700
      Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-29 13:34 +0000
        Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-29 07:35 -0700
          Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-29 15:05 +0000
          Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 16:19 +0100
            Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-07-29 21:48 +0100
        Re: RfD: Quotations mhx@iae.nl - 2015-07-29 11:13 -0700
          Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-30 13:04 +0000
      Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 15:07 +0100
        Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-29 07:44 -0700
          Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-29 15:12 +0000
          Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 16:18 +0100
            Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-29 18:37 +0200
              Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 17:55 +0100
                Re: RfD: Quotations "Elizabeth D. Rather" <erather@forth.com> - 2015-07-29 19:51 -0500
                  Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 03:31 +0200
                    Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-29 19:30 -0700
                      Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-29 21:19 -0700
                        Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-29 21:37 -0700
                          Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-30 11:45 +0000
                            Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-30 08:07 -0700
                              Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-31 10:54 +0000
                                Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 12:48 +0100
                                  Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-31 05:40 -0700
                                    Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 14:46 +0100
                                      Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 14:50 +0100
                                    Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-31 14:46 +0000
                                Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-31 13:16 -0700
                                  Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 21:49 +0100
                        Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-29 22:42 -0700
                        Re: RfD: Quotations "Elizabeth D. Rather" <erather@forth.com> - 2015-07-30 08:46 -0500
                    Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-29 21:40 -0700
                    Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 10:01 +0100
                      Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 12:00 +0200
                        Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 11:10 +0100
                    Re: RfD: Quotations Coos Haak <chforth@hccnet.nl> - 2015-07-30 16:35 +0200
              Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-29 16:53 +0000
            Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-29 19:03 +0200
              Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 18:24 +0100
                Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 01:38 +0200
                  Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 09:10 +0100
                    Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 12:06 +0200
                      Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 11:21 +0100
                        Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 14:00 +0200
                          Re: RfD: Quotations franck.bensusan@gmail.com - 2015-07-30 06:59 -0700
                          Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 10:53 +0100
              Re: RfD: Quotations Paul Rubin <no.email@nospam.invalid> - 2015-07-29 10:35 -0700
                Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 01:45 +0200
                  Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 03:17 +0200
                    Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-29 19:21 -0700
                    Re: RfD: Quotations Paul Rubin <no.email@nospam.invalid> - 2015-07-29 23:04 -0700
                      Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 12:38 +0200
                        Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 12:09 +0100
                          Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 13:26 +0200
                            Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 09:47 +0100
                              Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-31 02:51 -0700
                                Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 11:21 +0100
                  Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 09:11 +0100
              Re: RfD: Quotations Paul Rubin <no.email@nospam.invalid> - 2015-07-29 11:36 -0700
                Re: RfD: Quotations Paul Rubin <no.email@nospam.invalid> - 2015-07-29 11:37 -0700
              Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-30 13:07 +0000
                Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 16:25 +0200
            Re: RfD: Quotations mhx@iae.nl - 2015-07-29 11:16 -0700
              Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 20:27 +0100
                Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-07-29 21:57 +0100
                  Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 22:48 +0100
                    Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-07-31 12:34 +0100
                      Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 13:00 +0100
                        Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-31 14:31 +0000
                        Re: RfD: Quotations mhx@iae.nl - 2015-07-31 11:32 -0700
                Re: RfD: Quotations mhx@iae.nl - 2015-07-29 21:42 -0700
                  Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 09:57 +0100
            Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-29 17:21 -0700
              Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 09:56 +0100
                Re: RfD: Quotations franck.bensusan@gmail.com - 2015-07-30 04:15 -0700
                  Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 12:30 +0100
                    Re: RfD: Quotations franck.bensusan@gmail.com - 2015-07-30 05:04 -0700
                      Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-30 13:07 -0700
    Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-29 16:52 -0700
      Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 09:53 +0100
    Re: RfD: Quotations Bernd Paysan <bernd.paysan@gmx.de> - 2015-07-30 21:45 +0200
      Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-30 13:25 -0700
        Re: RfD: Quotations Julian Fondren <ayrnieu@gmail.com> - 2015-07-30 15:11 -0700
          Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 09:11 +0100
            Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-07-31 12:04 +0100
      Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 22:51 +0100
        Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-30 22:38 -0700
          Re: RfD: Quotations "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-31 02:10 -0400
          Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 09:01 +0100
            Re: RfD: Quotations hughaguilar96@gmail.com - 2015-08-01 14:59 -0700
              Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-08-01 23:36 +0100
                Re: RfD: Quotations Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-02 01:19 +0200
                  Re: RfD: Quotations hughaguilar96@gmail.com - 2015-08-01 18:27 -0700
                    Re: RfD: Quotations hughaguilar96@gmail.com - 2015-08-09 14:34 -0700
    Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-31 08:52 +0000
      Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 11:57 +0100
    Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-07-31 21:42 +0100
      Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 22:25 +0100
        Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-07-31 23:39 +0100
          Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-01 10:59 +0100
      Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-01 14:18 +0000
        Re: RfD: Quotations Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-01 22:10 +0200
          Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-02 05:36 +0000
            Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-03 16:40 +0100
              Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-08-03 18:02 +0100
                Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-03 20:22 +0100
              Re: RfD: Quotations Coos Haak <chforth@hccnet.nl> - 2015-08-04 02:10 +0200
                Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-04 08:49 +0100
    Re: RfD: Quotations hughaguilar96@gmail.com - 2015-08-01 15:15 -0700

Page 1 of 6  [1] 2 3 4 5 6  Next page →


#40881 — RfD: Quotations

From"Alex McDonald" <blog@rivadpm.com>
Date2015-07-28 21:22 +0100
SubjectRfD: Quotations
Message-ID<mp8o6q$plc$1@dont-email.me>
Stephen Pelc wrote this; see

http://newsgroups.derkeiler.com/Archive/Comp/comp.lang.forth/2012-07/msg00791.html

I (Alex McDonald) have taken it and modified it as a proposed RfD,
and have removed the discussion of closures. http://www.forth200x.org/

The following notes on quotations and closures incorporate material
from several people, including Anton Ertl, Andrew Haley, Marcel
Hendrix, Ward Mcfarland, Bernd Paysan, and Elizabeth Rather. If you
have been left out and want acknowledgement, please let me know.

Quotations
==========

Discussion
----------
The essence of quotations is to provide nested colon definitions,
in which the inner definition(s) are nameless. The expression

: foo ... [: some words ;] ... ;

is equivalent to

:noname some words ; Constant #temp#
: foo ... #temp# ... ;

A simple quotation is an anonymous colon definition that is defined
inside a colon definition or quotation.

If quotations are to have the same privileges as words defined with :
and :NONAME they should be able to use local variables and use
RECURSE and DOES>.

Locals: A quotation may not be able to access the locals of the outer
word because it has no knowledge of when it might be executed and
hence whether outer locals are still alive. It does permit defining and
accessing its own locals.

: foo ... [: {: a b :} a b + ;] ... ; \ unambiguous
: bar {: a b :} ... [: a b + ;] ... ; \ ambiguous

RECURSE: Recursion is defined as recursing to the start of the
quotation, not the enclosing definition.

DOES>: As with a normal definition that closes the DOES> action with ;
(semi-colon), a DOES> in a quotation is closed at the terminating ;]

One example use of quotations is to provide a solution to the use
of CATCH in a form close to other languages' TRY ... EXCEPT
blocks.

: foo ( i*x -- j*x )
    setup
    [: fee fi fo fum ;] catch
    if ... then
    teardown
    ( throw again ) ;

Under the term "Phrases", quotations have been in MacForth since at
least 1987. They are documented in the infamous "missing chapter" of
the MacForth manual.

Implementations exist in (at least) VFX, Gforth and iForth.

Specification
-------------
The following notations have been seen in the wild, oldest first.
    :| ... |;
    :[ ... ]:
    [: ... ;]

[: ( -- c: nested-sys )
Compilation: suspends compiling to the current definition, starts a
new nested definition, and compilation continues with this nested
definition. It is an ambiguous condition if outer locals are visible
and referred to in the nested definition. Locals may be defined in
the nested definition. Inside the nested definition RECURSE applies
to the nested definition.

;] ( c: nested-sys -- )
Compilation: Ends the current nested definition, and resumes
compilation to the previous current definition. This includes ending
the action of DOES> if any. It appends the following run-time to the
current definition:

run-time: ( -- xt )
xt is the execution token to execute the nested definition.

Implementation
--------------

It is not possible to define quotations in ISO Forth. The following
is an outline definition.

: [: ( -- c: nested-sys )
    postpone ahead :noname ; immediate

: ;] ( c: nested-sys -- ) ( -- xt )
    postpone ; postpone then ; immediate

[toc] | [next] | [standalone]


#40889

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2015-07-29 07:35 +0000
Message-ID<2015Jul29.093553@mips.complang.tuwien.ac.at>
In reply to#40881
"Alex McDonald" <blog@rivadpm.com> writes:
>[: ( -- c: nested-sys )

There is the danger of confusion with nest-sys (the return address of
a call to a colon definition).  Maybe quotation-sys?

Otherwise the RfD looks good (except that it does not contain test
cases).

>Implementation
>--------------
>
>It is not possible to define quotations in ISO Forth. The following
>is an outline definition.
>
>: [: ( -- c: nested-sys )
>    postpone ahead :noname ; immediate
>
>: ;] ( c: nested-sys -- ) ( -- xt )
>    postpone ; postpone then ; immediate

This does capture the fact that there is typically some state (e.g.,
STATE) that :NONAME does not save and ; does not restore, but that
needs to be saved and restored (well, for STATE it's sufficient to "]"
in ";]"). It also does not capture the necessary POSTPONE LITERAL.

There have been some discussions between Bernd Paysan and me that one
could capture the saving and restoring in a separate pair of words,
maybe [{ and }].  Then

: foo [: bla ;] ;

could also be expressed as

: foo [{ :noname bla ; >r }] [ r> ] literal ; 

The background is that Bernd Paysan likes to put additional
definitions inside the [: ... ;], e.g.

  [: yyy ; comp: zzz ;] set-to

based on the view that this is equivalent to

  [{ :noname yyy ; >r comp: zzz ; }] [ r> ] literal set-to

(which is still not that easy to understand; I think the idea is that
the EXECUTE and COMPILE, methods of TO FOO are specified through the
EXECUTE and COMPILE, methods of the xt passed to SET-TO.)

Anyway, given thatq, the definition of [: and ;] would
look as follows:

: [{ ( -- C: halfquot-sys )
  POSTPONE ahead save-colon-definition-state ; immediate
: }] ( C: half-quot-sys )
  restore-colon-definition-state postpone then ;
: [: ( -- C: quotation-sys )
  postpone [{ :noname ; immediate
: ;] ( C: quotation-sys -- ) ( -- xt )
  postpone ; >r postpone }] r> postpone literal ; immediate

- 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: http://www.forth200x.org/forth200x.html
   EuroForth 2015: http://www.mpeforth.com/euroforth2015/euroforth2015.htm

[toc] | [prev] | [next] | [standalone]


#40896

From"Alex McDonald" <blog@rivadpm.com>
Date2015-07-29 14:20 +0100
Message-ID<mpajr5$kib$1@dont-email.me>
In reply to#40889
on 29/07/2015 08:35:57,  wrote:
> "Alex McDonald" <blog@rivadpm.com> writes:
>>[: ( -- c: nested-sys )
> 
> There is the danger of confusion with nest-sys (the return address of
> a call to a colon definition).  Maybe quotation-sys?
> 
> Otherwise the RfD looks good (except that it does not contain test
> cases).
> 
>>Implementation
>>--------------
>>
>>It is not possible to define quotations in ISO Forth. The following
>>is an outline definition.
>>
>>: [: ( -- c: nested-sys )
>>    postpone ahead :noname ; immediate
>>
>>: ;] ( c: nested-sys -- ) ( -- xt )
>>    postpone ; postpone then ; immediate
> 
> This does capture the fact that there is typically some state (e.g.,
> STATE) that :NONAME does not save and ; does not restore, but that
> needs to be saved and restored (well, for STATE it's sufficient to "]"
> in ";]"). It also does not capture the necessary POSTPONE LITERAL.

I should have used my implementation, stripped back. I rewrote it too
hastily.

Rather than ; it uses EXIT, since it disturbs none of the state or STATE.

: [:  ( -- c: orig xt' ) \ start an anonymous quotation
    only-compiles> 
      postpone ahead :noname ; \ is xt'

: ;]  ( c: orig xt' -- ) ( -- s: xt' )  \ end an anonymous quotation
    only-compiles> 
      >r postpone exit
      postpone then
      r> postpone literal ;    \ xt' is the xt of the [: ;] section

On second thoughts, EXIT is not appropriate for a general solution. It's
not clear if the standard requires the XT of :NONAME to be available at
:NONAME or ; .

> 
> There have been some discussions between Bernd Paysan and me that one
> could capture the saving and restoring in a separate pair of words,
> maybe [{ and }].  Then
> 
>: foo [: bla ;] ;
> 
> could also be expressed as
> 
>: foo [{ :noname bla ; >r }] [ r> ] literal ;
> 
> The background is that Bernd Paysan likes to put additional
> definitions inside the [: ... ;], e.g.
> 
> [: yyy ; comp: zzz ;] set-to
> 
> based on the view that this is equivalent to
> 
> [{ :noname yyy ; >r comp: zzz ; }] [ r> ] literal set-to
> 
> (which is still not that easy to understand; I think the idea is that
> the EXECUTE and COMPILE, methods of TO FOO are specified through the
> EXECUTE and COMPILE, methods of the xt passed to SET-TO.)
> 
> Anyway, given thatq, the definition of [: and ;] would
> look as follows:
> 
>: [{ ( -- C: halfquot-sys )
> POSTPONE ahead save-colon-definition-state ; immediate
>: }] ( C: half-quot-sys )
> restore-colon-definition-state postpone then ;
>: [: ( -- C: quotation-sys )
> postpone [{ :noname ; immediate
>: ;] ( C: quotation-sys -- ) ( -- xt )
> postpone ; >r postpone }] r> postpone literal ; immediate
> 

Thanks.

I'll update the RfD and reisssue after waiting for other comments.

> - anton

[toc] | [prev] | [next] | [standalone]


#40892

FromRon Aaron <rambamist@gmail.com>
Date2015-07-29 13:44 +0300
Message-ID<mpaamp$iuv$1@dont-email.me>
In reply to#40881

On 7/28/15 23:22, Alex McDonald wrote:

> Quotations
> ==========
...
>
> A simple quotation is an anonymous colon definition that is defined
> inside a colon definition or quotation.
>
> If quotations are to have the same privileges as words defined with :
> and :NONAME they should be able to use local variables and use
> RECURSE and DOES>.
>
> Locals: A quotation may not be able to access the locals of the outer
> word because it has no knowledge of when it might be executed and
> hence whether outer locals are still alive. It does permit defining and
> accessing its own locals.

I had wondered what all the talk about "quotations" was.

8th doesn't have local variables or DOES>, but it does have quotations, 
using parentheses:

: a-word
   ...some code ...
   (  \ begin an anonymous "quotation"
      ... more code ...
      recurse \ to the start of the quotation, not 'a-word'
   )  \ end of the quotation
   ... yet more code
   ;  \ end of a-word

This style (without the extraneous comments) is very heavily used in 
8th, since the different kinds of iterators take a word to call for each 
iterated item, and it's very common to simply put the word-to-call in 
such a "quotation".

Aside from the lack of a name, there's no semantic difference between a 
colon-def and a quotation, in 8th.

[toc] | [prev] | [next] | [standalone]


#40895

From"Alex McDonald" <blog@rivadpm.com>
Date2015-07-29 13:42 +0100
Message-ID<mpahkf$c8f$1@dont-email.me>
In reply to#40892
on 29/07/2015 11:44:09, Ron Aaron wrote:
> 
> 
> On 7/28/15 23:22, Alex McDonald wrote:
> 
>> Quotations
>> =========...
>>
>> A simple quotation is an anonymous colon definition that is defined
>> inside a colon definition or quotation.
>>
>> If quotations are to have the same privileges as words defined with :
>> and :NONAME they should be able to use local variables and use
>> RECURSE and DOES>.
>>
>> Locals: A quotation may not be able to access the locals of the outer
>> word because it has no knowledge of when it might be executed and
>> hence whether outer locals are still alive. It does permit defining and
>> accessing its own locals.
> 
> I had wondered what all the talk about "quotations" was.
> 
> 8th doesn't have local variables or DOES>, but it does have
> quotations, using parentheses:
> 
>: a-word
> ...some code ...
> (  \ begin an anonymous "quotation"
> ... more code ...
> recurse \ to the start of the quotation, not 'a-word'
> )  \ end of the quotation
> ... yet more code
> ;  \ end of a-word
> 
> This style (without the extraneous comments) is very heavily used in
> 8th, since the different kinds of iterators take a word to call for
> each iterated item, and it's very common to simply put the
> word-to-call in such a "quotation".

Another use case. There are many where :NONAME can't be cleanly used (for
instance, inside a definition) and where using a named word requires the
programmer to think of a suitable name for a single use.

> 
> Aside from the lack of a name, there's no semantic difference between
> a colon-def and a quotation, in 8th.
> 

That's the intention with quotations.

[toc] | [prev] | [next] | [standalone]


#40894

FromRaimond Dragomir <raimond.dragomir@gmail.com>
Date2015-07-29 05:35 -0700
Message-ID<96810113-b65d-4116-9443-1d3b34cd9a71@googlegroups.com>
In reply to#40881
> Locals: A quotation may not be able to access the locals of the outer
> word because it has no knowledge of when it might be executed and
> hence whether outer locals are still alive. It does permit defining and
> accessing its own locals.
> 
> : foo ... [: {: a b :} a b + ;] ... ; \ unambiguous
> : bar {: a b :} ... [: a b + ;] ... ; \ ambiguous

These cases are not the same. To be the same, you would write:

: foo ... [: {: a b :} a b + ;] ... ; \ unambiguous
: bar {: a b :} ... [: to b to a a b + ;] ... ; \ ambiguous

I know that (at least) gforth is not able to see the outer locals inside 
a quotation, so you make the situation "ambiguous".
Why not make the following situation "ambiguous": executing a quotation 
wich uses outer locals outside of the life of the enclosing definition.
And make the locals "visible". Hard?

Also, in my opinion the syntax is really ugly. Even this variant is
better than the proposed one:

: foo ... [[ { a b } a b + ]] ... ; \ unambiguous
: bar { a b } ... [[ to b to a a b + ]] ... ; \ ambiguous

[toc] | [prev] | [next] | [standalone]


#40897

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2015-07-29 13:34 +0000
Message-ID<2015Jul29.153415@mips.complang.tuwien.ac.at>
In reply to#40894
Raimond Dragomir <raimond.dragomir@gmail.com> writes:
>Why not make the following situation "ambiguous": executing a quotation 
>wich uses outer locals outside of the life of the enclosing definition.
>And make the locals "visible". Hard?

At least harder, and in particular even harder to make efficient.
Take a look at the man-or-boy test (e.g., the Pascal variant at
http://rosettacode.org/wiki/Man_or_boy_test#Pascal) to get some idea
of the things you would have to be able to do.  Here's a
transliteration into Forth with your locals:

0 constant 0
1 constant 1
-1 constant -1
: a {: k x1 x2 x3 x4 x5 | b -- n :}
 [: k 1- to k
    k b x1 x2 x3 x4 A ;] to b
 k 0<= if 
   x4 execute x5 execute +
 else
   b execute
 then ;

10 ['] 1 ['] -1 ['] -1 ['] 1 ['] 0 a .

This should output -67.   

>Also, in my opinion the syntax is really ugly. Even this variant is
>better than the proposed one:
>
>: foo ... [[ { a b } a b + ]] ... ; \ unambiguous

{ } ]] and [[ are already used with other meanings in existing Forth
systems.

- 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: http://www.forth200x.org/forth200x.html
   EuroForth 2015: http://www.mpeforth.com/euroforth2015/euroforth2015.htm

[toc] | [prev] | [next] | [standalone]


#40899

FromRaimond Dragomir <raimond.dragomir@gmail.com>
Date2015-07-29 07:35 -0700
Message-ID<4d8890e0-2735-46fc-b33e-331e768d10c2@googlegroups.com>
In reply to#40897
> At least harder, and in particular even harder to make efficient.
> Take a look at the man-or-boy test (e.g., the Pascal variant at
> http://rosettacode.org/wiki/Man_or_boy_test#Pascal) to get some idea
> of the things you would have to be able to do.  Here's a
> transliteration into Forth with your locals:
> 
> 0 constant 0
> 1 constant 1
> -1 constant -1
> : a {: k x1 x2 x3 x4 x5 | b -- n :}
>  [: k 1- to k
>     k b x1 x2 x3 x4 A ;] to b
>  k 0<= if 
>    x4 execute x5 execute +
>  else
>    b execute
>  then ;
> 
> 10 ['] 1 ['] -1 ['] -1 ['] 1 ['] 0 a .
> 
> This should output -67.   

If you give an example, please give a working one. Who is "A" in the quotation?
I suppose it is the "a" definition. What is that? Recursion? From inside
a quotation to the outside definition? In what system is this working?
Or put it in another way: Is this functionality desired in the RfD? From 
what I've read, on the contrary.

> 
> { } ]] and [[ are already used with other meanings in existing Forth
> systems.
> 
Oops, they are taken. The standard I read doesn't say so.


> - 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: http://www.forth200x.org/forth200x.html
>    EuroForth 2015: http://www.mpeforth.com/euroforth2015/euroforth2015.htm

[toc] | [prev] | [next] | [standalone]


#40901

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2015-07-29 15:05 +0000
Message-ID<2015Jul29.170502@mips.complang.tuwien.ac.at>
In reply to#40899
Raimond Dragomir <raimond.dragomir@gmail.com> writes:
>> At least harder, and in particular even harder to make efficient.
>> Take a look at the man-or-boy test (e.g., the Pascal variant at
>> http://rosettacode.org/wiki/Man_or_boy_test#Pascal) to get some idea
>> of the things you would have to be able to do.  Here's a
>> transliteration into Forth with your locals:
>> 
>> 0 constant 0
>> 1 constant 1
>> -1 constant -1
>> : a {: k x1 x2 x3 x4 x5 | b -- n :}
>>  [: k 1- to k
>>     k b x1 x2 x3 x4 A ;] to b
>>  k 0<= if 
>>    x4 execute x5 execute +
>>  else
>>    b execute
>>  then ;
>> 
>> 10 ['] 1 ['] -1 ['] -1 ['] 1 ['] 0 a .
>> 
>> This should output -67.   
>
>If you give an example, please give a working one.

I don't know a working implementation of outer locals, so I cannot.

> Who is "A" in the quotation?
>I suppose it is the "a" definition. 

Yes.
>What is that? Recursion?

Yes.

>From inside
>a quotation to the outside definition? In what system is this working?

With this syntax, in none that I know.  If you write the first line

: a recursive {: k x1 x2 x3 x4 x5 | b -- n :}

the call works in Gforth.  Or you could write

defer a
:noname {: k x1 x2 x3 x4 x5 | b -- n :}
  [: k 1- to k
     k b x1 x2 x3 x4 a ;] to b
  k 0<= if 
    x4 execute x5 execute +
  else
    b execute
  then ; is a

>> { } ]] and [[ are already used with other meanings in existing Forth
>> systems.
>> 
>Oops, they are taken. The standard I read doesn't say so.

Certainly.  The standard only covers common practice, and does not
mention all the words where practice diverges (such as "{") or that
exists in only few systems (such as "]]").

- 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: http://www.forth200x.org/forth200x.html
   EuroForth 2015: http://www.mpeforth.com/euroforth2015/euroforth2015.htm

[toc] | [prev] | [next] | [standalone]


#40904

From"Alex McDonald" <blog@rivadpm.com>
Date2015-07-29 16:19 +0100
Message-ID<mpaqre$hg7$1@dont-email.me>
In reply to#40899
on 29/07/2015 15:35:08, Raimond Dragomir wrote:
>> At least harder, and in particular even harder to make efficient.
>> Take a look at the man-or-boy test (e.g., the Pascal variant at
>> http://rosettacode.org/wiki/Man_or_boy_test#Pascal) to get some idea
>> of the things you would have to be able to do.  Here's a
>> transliteration into Forth with your locals:
>>
>> 0 constant 0
>> 1 constant 1
>> -1 constant -1
>> : a {: k x1 x2 x3 x4 x5 | b -- n :}
>>  [: k 1- to k
>>     k b x1 x2 x3 x4 A ;] to b
>>  k 0<= if
>>    x4 execute x5 execute +
>>  else
>>    b execute
>>  then ;
>>
>> 10 ['] 1 ['] -1 ['] -1 ['] 1 ['] 0 a .
>>
>> This should output -67.
> 
> If you give an example, please give a working one. Who is "A" in the
> quotation? I suppose it is the "a" definition. What is that?
> Recursion? From inside a quotation to the outside definition? In what
> system is this working? Or put it in another way: Is this
> functionality desired in the RfD? From what I've read, on the
> contrary.

It works on my system (with a light modification to allow reference to
outer locals) up to k=3. At k=4 it blows away the return stack, which is
a small 4K in size.

A is the word A, not a recursion of the quotation. Anton had ['] instead
of ' . You might want to do this.

DEFER AONCEMORE

0 constant 0
1 constant 1
-1 constant -1
: a {: k x1 x2 x3 x4 x5 | b -- n :}
 [: k 1- to k
    k b x1 x2 x3 x4 AONCEMORE ;] to b
 k 0<= if 
   x4 execute x5 execute +
 else
   b execute
 then ;

' A IS AONCEMORE

10 ' 1 ' -1 ' -1 ' 1 ' 0 a .

[toc] | [prev] | [next] | [standalone]


#40920

FromGerry Jackson <gerry@jackson9000.fsnet.co.uk>
Date2015-07-29 21:48 +0100
Message-ID<mpbe44$1l4$1@dont-email.me>
In reply to#40904
On 29/07/2015 16:19, Alex McDonald wrote:
> on 29/07/2015 15:35:08, Raimond Dragomir wrote:
>>> >>At least harder, and in particular even harder to make efficient.
>>> >>Take a look at the man-or-boy test (e.g., the Pascal variant at
>>> >>http://rosettacode.org/wiki/Man_or_boy_test#Pascal) to get some idea
>>> >>of the things you would have to be able to do.  Here's a
>>> >>transliteration into Forth with your locals:
>>> >>
>>> >>0 constant 0
>>> >>1 constant 1
>>> >>-1 constant -1
>>> >>: a {: k x1 x2 x3 x4 x5 | b -- n :}
>>> >>  [: k 1- to k
>>> >>     k b x1 x2 x3 x4 A ;] to b
>>> >>  k 0<= if
>>> >>    x4 execute x5 execute +
>>> >>  else
>>> >>    b execute
>>> >>  then ;
>>> >>
>>> >>10 ['] 1 ['] -1 ['] -1 ['] 1 ['] 0 a .
>>> >>
>>> >>This should output -67.
>> >
>> >If you give an example, please give a working one. Who is "A" in the
>> >quotation? I suppose it is the "a" definition. What is that?
>> >Recursion? From inside a quotation to the outside definition? In what
>> >system is this working? Or put it in another way: Is this
>> >functionality desired in the RfD? From what I've read, on the
>> >contrary.
> It works on my system (with a light modification to allow reference to
> outer locals) up to k=3. At k=4 it blows away the return stack, which is
> a small 4K in size.

When I implemented Man or Boy a few years ago I had to increase GForth's 
return stack and dataspace to 500MB each to get k=24 to run and give the 
right answer.

-- 
Gerry

[toc] | [prev] | [next] | [standalone]


#40915

Frommhx@iae.nl
Date2015-07-29 11:13 -0700
Message-ID<fbcd1445-d631-42ce-9f76-f0257f90cbff@googlegroups.com>
In reply to#40897
On Wednesday, July 29, 2015 at 3:57:52 PM UTC+2, Anton Ertl wrote:
> Raimond Dragomir <raimond.dragomir@gmail.com> writes:
> >Why not make the following situation "ambiguous": executing a quotation 
> >wich uses outer locals outside of the life of the enclosing definition.
> >And make the locals "visible". Hard?
> 
> At least harder, and in particular even harder to make efficient.
> Take a look at the man-or-boy test (e.g., the Pascal variant at
> http://rosettacode.org/wiki/Man_or_boy_test#Pascal) to get some idea
> of the things you would have to be able to do.  Here's a
> transliteration into Forth with your locals:
> 
> 0 constant 0
> 1 constant 1
> -1 constant -1
> : a {: k x1 x2 x3 x4 x5 | b -- n :}
>  [: k 1- to k
>     k b x1 x2 x3 x4 A ;] to b
>  k 0<= if 
>    x4 execute x5 execute +
>  else
>    b execute
>  then ;
> 
> 10 ['] 1 ['] -1 ['] -1 ['] 1 ['] 0 a .
> 
> This should output -67.   

You mean:

10 ' 1 ' -1 ' -1 ' 1 ' 0 a .
 
Don't you?

> - anton

-marcel

[toc] | [prev] | [next] | [standalone]


#40967

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2015-07-30 13:04 +0000
Message-ID<2015Jul30.150438@mips.complang.tuwien.ac.at>
In reply to#40915
mhx@iae.nl writes:
>On Wednesday, July 29, 2015 at 3:57:52 PM UTC+2, Anton Ertl wrote:
>> Raimond Dragomir <raimond.dragomir@gmail.com> writes:
>> >Why not make the following situation "ambiguous": executing a quotation 
>> >wich uses outer locals outside of the life of the enclosing definition.
>> >And make the locals "visible". Hard?
>> 
>> At least harder, and in particular even harder to make efficient.
>> Take a look at the man-or-boy test (e.g., the Pascal variant at
>> http://rosettacode.org/wiki/Man_or_boy_test#Pascal) to get some idea
>> of the things you would have to be able to do.  Here's a
>> transliteration into Forth with your locals:
>> 
>> 0 constant 0
>> 1 constant 1
>> -1 constant -1
>> : a {: k x1 x2 x3 x4 x5 | b -- n :}
>>  [: k 1- to k
>>     k b x1 x2 x3 x4 A ;] to b
>>  k 0<= if 
>>    x4 execute x5 execute +
>>  else
>>    b execute
>>  then ;
>> 
>> 10 ['] 1 ['] -1 ['] -1 ['] 1 ['] 0 a .
>> 
>> This should output -67.   
>
>You mean:
>
>10 ' 1 ' -1 ' -1 ' 1 ' 0 a .

Yes.

- 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: http://www.forth200x.org/forth200x.html
   EuroForth 2015: http://www.mpeforth.com/euroforth2015/euroforth2015.htm

[toc] | [prev] | [next] | [standalone]


#40898

From"Alex McDonald" <blog@rivadpm.com>
Date2015-07-29 15:07 +0100
Message-ID<mpamku$vv5$1@dont-email.me>
In reply to#40894
on 29/07/2015 13:35:02, Raimond Dragomir wrote:
>> Locals: A quotation may not be able to access the locals of the outer
>> word because it has no knowledge of when it might be executed and
>> hence whether outer locals are still alive. It does permit defining and
>> accessing its own locals.
>>
>> : foo ... [: {: a b :} a b + ;] ... ; \ unambiguous
>> : bar {: a b :} ... [: a b + ;] ... ; \ ambiguous
> 
> These cases are not the same. To be the same, you would write:

They weren't meant to be the same; they were meant to illustrate the
text.

> 
>: foo ... [: {: a b :} a b + ;] ... ; \ unambiguous
>: bar {: a b :} ... [: to b to a a b + ;] ... ; \ ambiguous

That is equally ambiguous. In my BAR and your BAR, when the quotation is
executed outside the scope of BAR, A and B are not live. What is being
discussed and illustrated is the enclosing scope of the locals and their
liveness if they are used inside the quotation. How they are used is
immaterial.

> 
> I know that (at least) gforth is not able to see the outer locals
> inside a quotation, so you make the situation "ambiguous".
> Why not make the following situation "ambiguous": executing a
> quotation wich uses outer locals outside of the life of the enclosing
> definition. And make the locals "visible". Hard?

That now means we have to standardise an XT that "must execute within the
scope of the caller and can't be saved for later". This is not how
:NONAME and : work, and quotations are designed "to have the same
privileges as words defined with : and :NONAME". Users and implementers
are being advised here that supporting this type of XT is non-standard.
But as is usual with Forth, they can do what they wish outside of the
standard.

> 
> Also, in my opinion the syntax is really ugly. Even this variant is
> better than the proposed one:
> 
>: foo ... [[ { a b } a b + ]] ... ; \ unambiguous
>: bar { a b } ... [[ to b to a a b + ]] ... ; \ ambiguous
> 
> 

[[ and ]] have been proposed for POSTPONE source, and {: :} have been
standardised as enclosing locals.

[toc] | [prev] | [next] | [standalone]


#40900

FromRaimond Dragomir <raimond.dragomir@gmail.com>
Date2015-07-29 07:44 -0700
Message-ID<675f315e-17ca-4fbd-93bb-79ce8e9eae86@googlegroups.com>
In reply to#40898
> 
> That now means we have to standardise an XT that "must execute within the
> scope of the caller and can't be saved for later". This is not how
> :NONAME and : work, and quotations are designed "to have the same
> privileges as words defined with : and :NONAME". Users and implementers
> are being advised here that supporting this type of XT is non-standard.
> But as is usual with Forth, they can do what they wish outside of the
> standard.
> 
Why do you want to make it an umbiguous condition? Just say that the outer
locals are not visible and that's it. At least people will know what the 
rule is. Compilers will throw an error that the "x" is an unknown word and
everybody is happy. 

> > 
> [[ and ]] have been proposed for POSTPONE source, and {: :} have been
> standardised as enclosing locals.

Since when? We don't have other standard than '94.

[toc] | [prev] | [next] | [standalone]


#40902

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2015-07-29 15:12 +0000
Message-ID<2015Jul29.171244@mips.complang.tuwien.ac.at>
In reply to#40900
Raimond Dragomir <raimond.dragomir@gmail.com> writes:
>> {: :} have been
>> standardised as enclosing locals.
>
>Since when? We don't have other standard than '94.

We have Forth-2012, and it standardizes {: :}.

- 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: http://www.forth200x.org/forth200x.html
   EuroForth 2015: http://www.mpeforth.com/euroforth2015/euroforth2015.htm

[toc] | [prev] | [next] | [standalone]


#40903

From"Alex McDonald" <blog@rivadpm.com>
Date2015-07-29 16:18 +0100
Message-ID<mpaqpu$hc6$1@dont-email.me>
In reply to#40900
on 29/07/2015 15:44:03, Raimond Dragomir wrote:
>>
>> That now means we have to standardise an XT that "must execute within the
>> scope of the caller and can't be saved for later". This is not how
>> :NONAME and : work, and quotations are designed "to have the same
>> privileges as words defined with : and :NONAME". Users and implementers
>> are being advised here that supporting this type of XT is non-standard.
>> But as is usual with Forth, they can do what they wish outside of the
>> standard.
>>
> Why do you want to make it an umbiguous condition? Just say that the
> outer locals are not visible and that's it. At least people will know
> what the rule is. Compilers will throw an error that the "x" is an
> unknown word and everybody is happy.

Someone may wish to implement, as Hugh and I have done, a system that
allow reference to outer locals as long as the quotation isn't executed
out of the execution scope of its parent. Why would you want to disallow
that? The way this proposal is worded allows systems to offer more than
the standard or the standard alone.


> 
>> >
>> [[ and ]] have been proposed for POSTPONE source, and {: :} have been
>> standardised as enclosing locals.
> 
> Since when? We don't have other standard than '94.

This one; http://www.forth200x.org/documents/forth14-5.pdf from
http://www.forth200x.org.

{: :} are for locals. [[ and ]] are commonly used elsewhere, as are { }
which bracket comments in Forth Inc systems.

> 
> 
> 

[toc] | [prev] | [next] | [standalone]


#40907

FromBernd Linsel <bl1@gmx.com>
Date2015-07-29 18:37 +0200
Message-ID<mpavfq$pf5$1@newsreader4.netcologne.de>
In reply to#40903
On 29/07/2015 17:18, Alex McDonald wrote:>>> [[ and ]] have been 
proposed for POSTPONE source, and {: :} have been
 >>> standardised as enclosing locals.
 >>
 >> Since when? We don't have other standard than '94.
 >
 > This one; http://www.forth200x.org/documents/forth14-5.pdf from
 > http://www.forth200x.org.
 >
 > {: :} are for locals. [[ and ]] are commonly used elsewhere, as are { }
 > which bracket comments in Forth Inc systems.

Before F200x, common practice was using {...} for locals, only Forth, 
Inc. deviated and used the braces for multi-line-comments. I still 
wonder how this abomination could make it into the 2012 "standard", 
aside from the theory that commercial interests actually could influence 
the committee's work...

--
Best regards,
Bernd Linsel

[toc] | [prev] | [next] | [standalone]


#40908

From"Alex McDonald" <blog@rivadpm.com>
Date2015-07-29 17:55 +0100
Message-ID<mpb0f1$8c0$1@dont-email.me>
In reply to#40907
on 29/07/2015 17:37:14, Bernd Linsel wrote:
> On 29/07/2015 17:18, Alex McDonald wrote:>>> [[ and ]] have been
> proposed for POSTPONE source, and {: :} have been
> >>> standardised as enclosing locals.
> >>
> >> Since when? We don't have other standard than '94.
> >
> > This one; http://www.forth200x.org/documents/forth14-5.pdf from
> > http://www.forth200x.org.
> >
> > {: :} are for locals. [[ and ]] are commonly used elsewhere, as are
> { } > which bracket comments in Forth Inc systems.
> 
> Before F200x, common practice was using {...} for locals, only Forth,

What was standardised was LOCALS| |.

> Inc. deviated and used the braces for multi-line-comments. I still
> wonder how this abomination could make it into the 2012 "standard",
> aside from the theory that commercial interests actually could
> influence the committee's work...

Of course commercial interests influence the committee's work. Standards
aren't about intellectual purity tests for academics.

> 
> --
> Best regards,
> Bernd Linsel
> 
> 

[toc] | [prev] | [next] | [standalone]


#40930

From"Elizabeth D. Rather" <erather@forth.com>
Date2015-07-29 19:51 -0500
Message-ID<9vidndyjbZy36CTInZ2dnUU7-YOdnZ2d@supernews.com>
In reply to#40908
On 7/29/15 11:55 AM, Alex McDonald wrote:
> on 29/07/2015 17:37:14, Bernd Linsel wrote:
>> On 29/07/2015 17:18, Alex McDonald wrote:>>> [[ and ]] have been
>> proposed for POSTPONE source, and {: :} have been
>>>>> standardised as enclosing locals.
>>>>
>>>> Since when? We don't have other standard than '94.
>>>
>>> This one; http://www.forth200x.org/documents/forth14-5.pdf from
>>> http://www.forth200x.org.
>>>
>>> {: :} are for locals. [[ and ]] are commonly used elsewhere, as are
>> { } > which bracket comments in Forth Inc systems.
>>
>> Before F200x, common practice was using {...} for locals, only Forth,
>
> What was standardised was LOCALS| |.
>
>> Inc. deviated and used the braces for multi-line-comments. I still
>> wonder how this abomination could make it into the 2012 "standard",
>> aside from the theory that commercial interests actually could
>> influence the committee's work...
>
> Of course commercial interests influence the committee's work. Standards
> aren't about intellectual purity tests for academics.

It's appropriate for a standard to avoid standardizing any name in a way 
that conflicts with widespread usage, regardless of whether the usage is 
of a commercial on non-comercial system.

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

[toc] | [prev] | [next] | [standalone]


Page 1 of 6  [1] 2 3 4 5 6  Next page →

Back to top | Article view | comp.lang.forth


csiph-web