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


Groups > comp.lang.forth > #50260

Re: A use for quotations

From Gerry Jackson <gerry@jackson9000.fsnet.co.uk>
Newsgroups comp.lang.forth
Subject Re: A use for quotations
Date 2016-08-19 23:03 +0100
Organization A noiseless patient Spider
Message-ID <np7vns$dlr$1@dont-email.me> (permalink)
References (1 earlier) <np0el8$1k5c$1@gioia.aioe.org> <np19dr$3ko$1@dont-email.me> <np35u4$141d$1@gioia.aioe.org> <np77an$jqr$1@dont-email.me> <mLSdnbbqosvwwirKnZ2dnUU7-d3NnZ2d@supernews.com>

Show all headers | View raw


On 19/08/2016 20:35, Elizabeth D. Rather wrote:
> On 8/19/16 5:07 AM, Gerry Jackson wrote:
>> On 18/08/2016 03:18, HAA wrote:
>>> Gerry Jackson wrote:
>>>> On 17/08/2016 02:29, HAA wrote:
>>>>> ...
>>>>> I see :NONAME is a primitive - a low-level mechanism that can be
>>>>> applied
>>>>> to a variety of situations.  While name-lessness in general is a bad
>>>>> thing
>>>>> (hard to test,
>>>>
>>>> I've used :NONAME extensively and don't think such definitions are any
>>>> harder to test than other definitions.
>>>
>>> A name is convenient and always available, an xt often isn't.
>>
>> When testing it is easy to temporarily give a :noname definition a name
>> :NONAME ... ; constant fred
>>
>>>  Quotations are
>>> worse when it comes to testing because they must be embedded in another
>>> definition
>>
>> Again it's easy to temporarily name and test a quotation
>>
>> : foo ... [: ... ;] constant ... ;
>> foo fred
>> fred execute
>>
>>> (funny because that was also the complaint about CATCH :)
>>
>> I don't understand - CATCH doesn't have to be embedded in another
>> definition
>
> It has to be embedded in *a* definition, not used interpretively.
> :noname makes its own unnamed definition, whereas quotations and CATCHes
> must be in a definition. I agree that this renders quotations less
> attractive, although I'm not a great fan of :noname, either.
>
> Cheers,
> Elizabeth
>

Well I can't find anywhere in the standard where CATCH is forbidden in 
interpretation mode. The specification for CATCH doesn't say its 
interpretation semantics are undefined. It's not listed in ambiguous 
conditions. Perhaps you can provide a reference to prove otherwise.

Furthermore it works in GForth, VFX Forth, Swiftforth and my Forth (the 
only systems I've to hand) e.g try

: x 999 throw ;
' x catch cr 999 = [if] .( Caught) [else] .( Not caught) [then]

Of course that doesn't prove it is standard usage.

-- 
Gerry

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


Thread

A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-14 19:51 +0100
  Re: A use for quotations Bernd Paysan <bernd.paysan@gmx.de> - 2016-08-14 19:44 +0000
    Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-14 22:57 +0100
  Re: A use for quotations hughaguilar96@gmail.com - 2016-08-14 14:05 -0700
    Re: A use for quotations Cecil Bayona <cbayona@cbayona.com> - 2016-08-14 16:16 -0500
  Re: A use for quotations "HAA" <someone@microsoft.com> - 2016-08-17 11:29 +1000
    Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-17 10:06 +0100
      Re: A use for quotations "HAA" <someone@microsoft.com> - 2016-08-18 12:18 +1000
        Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-19 16:07 +0100
          Re: A use for quotations "Elizabeth D. Rather" <erather@forth.com> - 2016-08-19 09:35 -1000
            Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-19 23:03 +0100
          Re: A use for quotations "HAA" <someone@microsoft.com> - 2016-08-20 13:19 +1000
            Re: A use for quotations Coos Haak <htrofhc@gmail.com> - 2016-08-20 14:55 +0200
              Re: A use for quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-08-20 15:38 +0000
              Re: A use for quotations "HAA" <someone@microsoft.com> - 2016-08-22 14:58 +1000
                Re: A use for quotations Julian Fondren <julian.fondren@gmail.com> - 2016-08-22 04:18 -0700
                Re: A use for quotations Coos Haak <htrofhc@gmail.com> - 2016-08-22 15:13 +0200
                Re: A use for quotations "HAA" <someone@microsoft.com> - 2016-08-24 22:20 +1000
                Re: A use for quotations hughaguilar96@gmail.com - 2016-08-24 09:44 -0700
                Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-25 10:09 +0100
                Re: A use for quotations "HAA" <someone@microsoft.com> - 2016-08-27 12:24 +1000
  Re: A use for quotations humptydumpty <ouatubi@gmail.com> - 2016-08-17 00:55 -0700
    Re: A use for quotations hughaguilar96@gmail.com - 2016-08-17 02:19 -0700
      Re: A use for quotations humptydumpty <ouatubi@gmail.com> - 2016-08-17 07:49 -0700
        Re: A use for quotations humptydumpty <ouatubi@gmail.com> - 2016-08-17 08:18 -0700
    Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-17 10:30 +0100
      Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-17 10:34 +0100
        Re: A use for quotations humptydumpty <ouatubi@gmail.com> - 2016-08-17 07:43 -0700
      Re: A use for quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-08-18 07:35 +0000

csiph-web