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


Groups > comp.lang.forth > #52692

Re: Any practical use for Atoms?

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: Any practical use for Atoms?
Date 2016-11-17 13:32 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2016Nov17.143210@mips.complang.tuwien.ac.at> (permalink)
References <12a2ec20-009c-4e5b-92b5-e48b0da40aa0@googlegroups.com> <20161114163914.102569f9@_> <o0fhjq$i48$1@dont-email.me> <9be04b9a-f8e9-4777-8bfd-0e8e08a9eead@googlegroups.com> <o0hdva$r0p$1@cherry.spenarnc.xs4all.nl>

Show all headers | View raw


albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) writes:
>In the context of lisp it is unthinkably clumsy to add a declaration
>for all symbols in an example like
>
>guile> (define a  '(we gaan naar rome en we worden kampioen))
>guile> a
>(we gaan naar rome en we worden kampioen)
>
>So in fact it *is* a big deal.

Not in Forth.  Anyway, if we want something like that, we can do it.
E.g., in <https://rosettacode.org/wiki/Topological_sort#Forth> the
input looks like this:

deps des_system_lib std synopsys std_cell_lib des_system_lib dw02 dw01 ramlib ieee
deps dw01           ieee dw01 dware gtech
deps dw02           ieee dw02 dware
deps dw03           std synopsys dware dw03 dw02 dw01 ieee gtech
...

In a Lisp program these are all atoms (see, e.g.,
<https://rosettacode.org/wiki/Topological_sort#Racket>, and the Racket
input is actually farther from the task description than the Forth
input); in the Forth program, they are all words, without a need for a
separate declaration for each word.

- 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 2016: http://www.euroforth.org/ef16/

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


Thread

Any practical use for Atoms? trans <transfire@gmail.com> - 2016-11-14 08:42 -0800
  Re: Any practical use for Atoms? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-11-14 10:48 -0600
    Re: Any practical use for Atoms? Paul Rubin <no.email@nospam.invalid> - 2016-11-14 08:51 -0800
      Re: Any practical use for Atoms? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-11-14 12:03 -0600
        Re: Any practical use for Atoms? Paul Rubin <no.email@nospam.invalid> - 2016-11-15 22:31 -0800
          Re: Any practical use for Atoms? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-11-16 03:01 -0600
  Re: Any practical use for Atoms? Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> - 2016-11-14 16:39 -0500
    Re: Any practical use for Atoms? trans <transfire@gmail.com> - 2016-11-14 14:12 -0800
    Re: Any practical use for Atoms? Mark Wills <markwills1970@gmail.com> - 2016-11-15 03:16 -0800
    Re: Any practical use for Atoms? Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-11-15 17:46 +0000
      Re: Any practical use for Atoms? trans <transfire@gmail.com> - 2016-11-15 21:00 -0800
        Re: Any practical use for Atoms? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-11-16 11:55 +0100
          Re: Any practical use for Atoms? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-11-17 13:32 +0000
  Re: Any practical use for Atoms? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-11-15 13:21 +0100

csiph-web