Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #43805
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: description of Forth-2012's `synonym` |
| Date | 2015-11-26 07:15 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2015Nov26.081523@mips.complang.tuwien.ac.at> (permalink) |
| References | (4 earlier) <3a2d26eb-f11d-43b7-b601-6a005da5c763@googlegroups.com> <2015Nov25.141310@mips.complang.tuwien.ac.at> <bb290d85-beec-4309-839f-a01e53e819c3@googlegroups.com> <2015Nov25.193315@mips.complang.tuwien.ac.at> <90eddce9-3ce9-42c5-bce9-15a1f86e789f@googlegroups.com> |
Raimond Dragomir <raimond.dragomir@gmail.com> writes:
>> ' s" constant s"-xt
>> : foo" s"-xt execute type ; immediate
>> cr : bar foo" bla" ; \ should print "bla"
...
>The problem is that you want to use S" for something it is not designed for.
>You can't use S" just like that and expect what you expect.
Sure I can, and I can even get what I expect, with the appropriate
implementation:
Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
' s" constant s"-xt ok
: foo" s"-xt execute type ; immediate ok
cr : bar foo" bla" ; \ should print "bla"
bla ok
>S" in a definition compiles the string into the body.
>It is designed to do that. Trying to use it in another way is not a corner
>case. It is just a mistake.
Not according to the standard. We actually considered removing the
allowance for ticking, POSTPONEing and [COMPILE]ing S" from Forth-2012
in order to make STATE-smart implementations standard, but obviously
forgot to actually do it.
Anyway, my point is that contrary to what you claim, a STATE-smart
implementation of S" is anything but clean. And after having
discussed this for 19 years, I now think that the best solution is to
get rid of words like S".
- 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.rigwit.co.uk/EuroForth2015/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
description of Forth-2012's `synonym` Marcos Cruz <use_the_contact_page@programandala.net> - 2015-11-23 20:47 +0000
Re: description of Forth-2012's `synonym` Bernd Paysan <bernd.paysan@gmx.de> - 2015-11-23 22:55 +0100
Re: description of Forth-2012's `synonym` Marcos Cruz <use_the_contact_page@programandala.net> - 2015-11-23 22:20 +0000
Re: description of Forth-2012's `synonym` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-24 05:12 +0000
Re: description of Forth-2012's `synonym` Marcos Cruz <use_the_contact_page@programandala.net> - 2015-11-24 17:29 +0000
Re: description of Forth-2012's `synonym` Bernd Paysan <bernd.paysan@gmx.de> - 2015-11-25 02:46 +0100
Re: description of Forth-2012's `synonym` Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-11-24 22:46 -0800
Re: description of Forth-2012's `synonym` Mark Wills <markwills1970@gmail.com> - 2015-11-25 01:39 -0800
Re: description of Forth-2012's `synonym` Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-11-25 02:37 -0800
Re: description of Forth-2012's `synonym` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-25 13:13 +0000
Re: description of Forth-2012's `synonym` Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-11-25 09:06 -0800
Re: description of Forth-2012's `synonym` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-25 18:33 +0000
Re: description of Forth-2012's `synonym` Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-11-25 23:01 -0800
Re: description of Forth-2012's `synonym` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-26 07:15 +0000
Re: description of Forth-2012's `synonym` Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-11-26 02:30 -0800
Re: description of Forth-2012's `synonym` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-26 13:44 +0000
Re: description of Forth-2012's `synonym` Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-11-25 17:27 +0000
Re: description of Forth-2012's `synonym` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-26 07:56 +0000
Re: description of Forth-2012's `synonym` Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-26 11:25 +0000
Re: description of Forth-2012's `synonym` Bernd Paysan <bernd.paysan@gmx.de> - 2015-11-27 01:36 +0100
Re: description of Forth-2012's `synonym` Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-27 16:57 +0000
Re: description of Forth-2012's `synonym` Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-11-27 19:18 +0000
Re: description of Forth-2012's `synonym` Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-11-27 19:22 +0000
Re: description of Forth-2012's `synonym` Mark Wills <markwills1970@gmail.com> - 2015-11-27 11:48 -0800
Re: description of Forth-2012's `synonym` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-28 11:07 +0000
Re: description of Forth-2012's `synonym` Matthias Trute <matthias.trute@gmail.com> - 2015-11-28 12:34 -0800
Re: description of Forth-2012's `synonym` hughaguilar96@gmail.com - 2015-11-26 18:43 -0800
Re: description of Forth-2012's `synonym` Marcos Cruz <use_the_contact_page@programandala.net> - 2015-12-05 03:35 +0000
Re: description of Forth-2012's `synonym` hughaguilar96@gmail.com - 2015-11-26 14:39 -0800
csiph-web