Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #19509
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Specifying interfaces of "read-ahead" words |
| Date | 2013-02-06 15:34 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2013Feb6.163431@mips.complang.tuwien.ac.at> (permalink) |
| References | <6ee6566a-e1a5-4b62-8209-4b4f0613da5c@w4g2000vbk.googlegroups.com> <csrg06b9teb6$.6dudas4gdnfo.dlg@40tude.net> <26bbb8c2-d363-42b7-8fe3-37d6ca1fff76@o5g2000vbp.googlegroups.com> <Ub-dnVe8e6E6AIzMnZ2dnUVZ_qKdnZ2d@supernews.com> |
"Elizabeth D. Rather" <erather@forth.com> writes:
>> Sure, but "<spaces>name" does not come from the _stack_ so why is it
>> shown on the input side of a _stack signature_.
>
>Because it isn't just a *stack* signature, it's a description of the
>arguments for the word, in and out. I agree it's not all that beautiful,
>but it's a compromise that the original Forth94 TC came up with, and a
>lot of people understand it at this point.
Yes. It's called "stack notation" because that's where it originates,
and the majority of uses just deal with stacks. If you want a more
general name, you might call is "stack and parsed-text notation", but
I guess most people prefer to stick with "stack notation" even if that
is not 100% accurate.
I also think that, once you accept that it does not just deal with
stacks, it's pretty logical that one puts the inputs to the left of
"--" and the outputs to the right. Sure, one could have a separated
parsed-input notation, but does that buy anything?
Concerning "confusing", I think that, once the convention is learned,
either one may be confusing, and once you have learned a particular
one, it will not be confusing.
However, I find it suboptimal that the standard is not consistent in
it's use of unified or separated notation. Some things are unified,
some are separated. E.g., consider a hypothetical word that would be
written in unified notation:
Execution: ( x1 C:orig F:r1 R:x2 "<spaces>name" -- x2 C:dest F:r2 R:x1 )
or in separated notation:
( x1 -- x2 ) ( C: orig -- dest ) ( F: r1 -- r2 ) ( R: x2 -- x1 )
( IS: "<spaces>name" -- )
In the standard it would be (I think:)
( x1 "<spaces>name" -- x2 ) ( C: orig -- dest ) ( F: r1 -- r2 ) ( R: x2 -- x1 )
This is mitigated by the fact that most words act on only one or two stacks.
--
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 2013: http://www.euroforth.org/ef13/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Specifying interfaces of "read-ahead" words Mark Wills <forthfreak@gmail.com> - 2013-02-05 05:38 -0800
Re: Specifying interfaces of "read-ahead" words Alex McDonald <blog@rivadpm.com> - 2013-02-05 06:09 -0800
Re: Specifying interfaces of "read-ahead" words Mark Wills <forthfreak@gmail.com> - 2013-02-05 06:29 -0800
Re: Specifying interfaces of "read-ahead" words Alex McDonald <blog@rivadpm.com> - 2013-02-05 07:02 -0800
Re: Specifying interfaces of "read-ahead" words Mark Wills <forthfreak@gmail.com> - 2013-02-05 07:17 -0800
Re: Specifying interfaces of "read-ahead" words Josh Grams <josh@qualdan.com> - 2013-02-05 21:07 +0000
Re: Specifying interfaces of "read-ahead" words Coos Haak <chforth@hccnet.nl> - 2013-02-05 18:18 +0100
Re: Specifying interfaces of "read-ahead" words Mark Wills <forthfreak@gmail.com> - 2013-02-05 13:54 -0800
Re: Specifying interfaces of "read-ahead" words "Elizabeth D. Rather" <erather@forth.com> - 2013-02-05 14:02 -1000
Re: Specifying interfaces of "read-ahead" words Mark Wills <forthfreak@gmail.com> - 2013-02-05 23:19 -0800
Re: Specifying interfaces of "read-ahead" words Alex McDonald <blog@rivadpm.com> - 2013-02-06 06:59 -0800
Re: Specifying interfaces of "read-ahead" words anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-02-06 15:34 +0000
Re: Specifying interfaces of "read-ahead" words Doug Hoffman <glidedog@gmail.com> - 2013-02-05 20:48 -0500
Re: Specifying interfaces of "read-ahead" words Mark Wills <forthfreak@gmail.com> - 2013-02-05 23:17 -0800
Re: Specifying interfaces of "read-ahead" words Paul Rubin <no.email@nospam.invalid> - 2013-02-06 00:01 -0800
Re: Specifying interfaces of "read-ahead" words Mark Wills <forthfreak@gmail.com> - 2013-02-06 01:02 -0800
Re: Specifying interfaces of "read-ahead" words Doug Hoffman <glidedog@gmail.com> - 2013-02-06 04:24 -0500
Re: Specifying interfaces of "read-ahead" words Doug Hoffman <glidedog@gmail.com> - 2013-02-06 07:39 -0500
Re: Specifying interfaces of "read-ahead" words "Peter Knaggs" <pjk@bcs.org.uk> - 2013-02-11 08:07 +0000
Re: Specifying interfaces of "read-ahead" words Mark Wills <forthfreak@gmail.com> - 2013-02-11 07:10 -0800
Re: Specifying interfaces of "read-ahead" words "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2013-02-11 15:51 -0800
Re: Specifying interfaces of "read-ahead" words Mark Wills <forthfreak@gmail.com> - 2013-02-11 23:05 -0800
Re: Specifying interfaces of "read-ahead" words "Elizabeth D. Rather" <erather@forth.com> - 2013-02-11 22:03 -1000
Re: Specifying interfaces of "read-ahead" words "Peter Knaggs" <pjk@bcs.org.uk> - 2013-02-13 07:39 +0000
Re: Specifying interfaces of "read-ahead" words Mark Wills <forthfreak@gmail.com> - 2013-02-13 00:23 -0800
Re: Specifying interfaces of "read-ahead" words "Peter Knaggs" <pjk@bcs.org.uk> - 2013-02-13 18:08 +0000
Re: Specifying interfaces of "read-ahead" words "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2013-02-09 13:49 -0800
Re: Specifying interfaces of "read-ahead" words Coos Haak <chforth@hccnet.nl> - 2013-02-10 00:17 +0100
Re: Specifying interfaces of "read-ahead" words "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2013-02-09 17:20 -0800
Re: Specifying interfaces of "read-ahead" words "Peter Knaggs" <pjk@bcs.org.uk> - 2013-02-11 08:29 +0000
Re: Specifying interfaces of "read-ahead" words anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-02-11 14:27 +0000
csiph-web