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


Groups > comp.lang.forth > #30390

Re: Quotations revisited

From "Alex McDonald" <blog@rivadpm.com>
Newsgroups comp.lang.forth
Subject Re: Quotations revisited
Date 2014-05-14 20:48 -0400
Organization A noiseless patient Spider
Message-ID <ll12st$5cp$1@dont-email.me> (permalink)
References (2 earlier) <0f4458ee-c0b2-4e35-a3e7-8d6fa2a9ee60@googlegroups.com> <003db215-a6db-4370-aea8-acec3fb2b99f@googlegroups.com> <2014May13.143551@mips.complang.tuwien.ac.at> <lku7vc$upv$1@dont-email.me> <2014May14.161502@mips.complang.tuwien.ac.at>

Show all headers | View raw


on 14/05/2014 10:15:01,  wrote:
> "Alex McDonald" <blog@rivadpm.com> writes:
>>on 13/05/2014 13:35:54,  wrote:
>>> Right.  That's why quotations don't support access not outer
>>> locals and thats why we call them quotations, not closures.
>>>
>>> - anton
>>
>>Calling them quotations would be clearer if we abandon the de facto
>>standard of [: ;] . It looks too much like a full definition or a
>>closure.
> 
> What makes you think so?  I know no programming language where [: ;]
> denotes a closure.  Also, if we can implement full closures (upward
> funargs in Lisp terminology) or downward funargs without changing the
> syntax, I would do so.  The difference is just in which locals are
> visible (quotations vs. closures), and how long the xt is valid
> (upward vs. downward funargs), and there is no point in changing the
> syntax for that.
> 
> - anton

I was seriously jetlagged when I wrote that. It was a mess. Let me
attempt to clarify. I meant no attempt to change or expand on the
definition of a quotation; just the characters that are used to bracket
the quotation.

[' '] seems (to me anyhow) to visually better express what we're doing
here with a quotation. It's the multi part equivalent of ['] <name> which
also produces an xt, doesn't permit locals and has an identical lifespan.
For example (contrived)

.. ['] over ... 
.. [' >r dup r> swap '] ...  

would seem clearer than 
.. [: >r dup r> swap ;] ...

If ever closures were required, then [: ;] would seem to (visually again)
be more consistent with an unnamed equivalent to a full : ; definition. 

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


Thread

Re: Quotations revisited Mark Wills <markwills1970@gmail.com> - 2014-05-13 01:00 -0700
  Re: Quotations revisited Howerd <howerdo@yahoo.co.uk> - 2014-05-13 01:50 -0700
  Re: Quotations revisited Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-05-13 03:51 -0500
    Re: Quotations revisited Mark Wills <markwills1970@gmail.com> - 2014-05-13 02:25 -0700
      Re: Quotations revisited Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-05-13 05:08 -0500
        Re: Quotations revisited "Elizabeth D. Rather" <erather@forth.com> - 2014-05-13 07:46 -1000
        Re: Quotations revisited Paul Rubin <no.email@nospam.invalid> - 2014-05-13 11:03 -0700
          Re: Quotations revisited "Elizabeth D. Rather" <erather@forth.com> - 2014-05-13 08:12 -1000
          Re: Quotations revisited Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-05-13 13:22 -0500
  Re: Quotations revisited stephenXXX@mpeforth.com (Stephen Pelc) - 2014-05-13 09:15 +0000
    Re: Quotations revisited Mark Wills <markwills1970@gmail.com> - 2014-05-13 02:39 -0700
      Re: Quotations revisited Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-05-13 05:10 -0500
      Re: Quotations revisited stephenXXX@mpeforth.com (Stephen Pelc) - 2014-05-13 11:47 +0000
      Re: Quotations revisited Laurent Laborde <kerdezixe@gmail.com> - 2014-05-13 19:13 -0700
      Re: Quotations revisited Paul Rubin <no.email@nospam.invalid> - 2014-05-13 19:48 -0700
  Re: Quotations revisited Alexander Skobelev <al.skobelev@gmail.com> - 2014-05-13 03:43 -0700
    Re: Quotations revisited anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-05-13 12:35 +0000
      Re: Quotations revisited "Alex McDonald" <blog@rivadpm.com> - 2014-05-13 23:56 +0100
        Re: Quotations revisited anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-05-14 14:15 +0000
          Re: Quotations revisited "Alex McDonald" <blog@rivadpm.com> - 2014-05-14 20:48 -0400
            Re: Quotations revisited anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-05-15 14:16 +0000
      Re: Quotations revisited Alexander Skobelev <al.skobelev@gmail.com> - 2014-05-13 23:30 -0700
        Re: Quotations revisited Paul Rubin <no.email@nospam.invalid> - 2014-05-14 00:32 -0700
          Re: Quotations revisited Alexander Skobelev <al.skobelev@gmail.com> - 2014-05-14 02:02 -0700
            Re: Quotations revisited Paul Rubin <no.email@nospam.invalid> - 2014-05-14 08:02 -0700
              Re: Quotations revisited anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-05-14 15:10 +0000
          Re: Quotations revisited Mark Wills <markwills1970@gmail.com> - 2014-05-14 02:09 -0700
            Re: Quotations revisited Mark Wills <markwills1970@gmail.com> - 2014-05-14 02:14 -0700
              Re: Quotations revisited Mark Wills <markwills1970@gmail.com> - 2014-05-14 02:15 -0700
                Re: Quotations revisited Paul Rubin <no.email@nospam.invalid> - 2014-05-14 08:22 -0700
            Re: Quotations revisited Coos Haak <chforth@hccnet.nl> - 2014-05-14 12:04 +0200
        Re: Quotations revisited Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-05-14 04:11 -0500
        Re: Quotations revisited anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-05-14 14:25 +0000
          Re: Quotations revisited Bernd Paysan <bernd.paysan@gmx.de> - 2014-05-14 20:04 +0200
            Re: Quotations revisited anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-05-15 13:50 +0000
              Re: Quotations revisited Bernd Paysan <bernd.paysan@gmx.de> - 2014-05-15 16:24 +0200
                Re: Quotations revisited anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-05-15 14:40 +0000
                Re: Quotations revisited Mark Wills <markwills1970@gmail.com> - 2014-05-15 10:18 -0700
          Re: Quotations revisited Alexander Skobelev <al.skobelev@gmail.com> - 2014-05-14 21:57 -0700

csiph-web