Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #10670
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Which standard? |
| Date | 2012-03-31 13:46 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2012Mar31.154600@mips.complang.tuwien.ac.at> (permalink) |
| References | <30794f7f396fa9ad7ec52f034288c527@dizum.com> <33310182.902.1332825284324.JavaMail.geo-discussion-forums@vbbdy9> <1b5d027d-8ff1-4148-9f09-c263f742846a@fk28g2000vbb.googlegroups.com> <32128823.358.1332852117878.JavaMail.geo-discussion-forums@ynjx8> <jktj8u$3ln$1@online.de> |
Bernd Paysan <bernd.paysan@gmx.de> writes:
>Helmar Wodtke wrote:
>> As it's also bound to local variables, it breaks the "old" concept of
>> Forth how variables are defined - locals could follow this idea in a
>> theory, but that would make problems with optimizing compilers.
>
>Maybe in theory, but in practice, any optimizing compiler that is smart
>enough to put locals into a register is easily smart enough to transform
>all occurances of <local> @ and <local> ! into virtual register moves.
>If there is no query of the virtual register's address left, it can go
>to a real register.
VALUE-flavoured locals have another advantage: When they are no longer
visible, their memory can not be accessed, so it can be reused. For
VARIABLE-flavoured locals you then have to define the lifetime of the
memory, and you can get addresses of locals that are no longer valid.
Gforth has had both flavours of locals since 1994, and
variable-flavoured locals have been used hardly, if ever.
>And the other opinion about locals (especially Anton's) is that you
>shouldn't change it (single static assignment). It gets its value
>through its definition, and that's good enough.
In most cases that's the way to go, but in a few cases using TO is
preferable. The typical case is the update of a local in an IF
branch. So you have
... ( n ) { x }
... IF
... TO x ...
THEN
... x ...
If you really wanted to do this in complete single-assignment style,
you would get maybe something like:
... ( n ) { x1 }
... IF
... { x2 } ... x2
ELSE
x1
THEN { x3 }
... x3 ...
That does not make things any clearer, nor do I see other advantages.
- 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 2011: http://www.euroforth.org/ef11/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar
Which standard? Nomen Nescio <nobody@dizum.com> - 2012-03-21 15:13 +0100
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-21 10:37 -0500
Re: Which standard? Nomen Nescio <nobody@dizum.com> - 2012-03-21 20:23 +0100
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-22 13:34 -0500
Re: Which standard? Nomen Nescio <nobody@dizum.com> - 2012-03-26 20:40 +0200
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-26 15:00 -0500
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-26 11:18 -1000
Re: Which standard? Bernd Paysan <bernd.paysan@gmx.de> - 2012-03-27 02:20 +0200
Re: Which standard? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-27 10:10 +0000
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-27 08:31 -0500
Re: Which standard? Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-27 17:08 +0200
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-27 11:31 -0500
Re: Which standard? Helmar Wodtke <helmwo@gmail.com> - 2012-03-27 09:35 -0700
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-27 11:47 -0500
Re: Which standard? Helmar Wodtke <helmwo@gmail.com> - 2012-03-27 10:15 -0700
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-27 12:33 -0500
Re: Which standard? Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-26 21:00 +0200
Re: Which standard? BruceMcF <agila61@netscape.net> - 2012-03-26 13:17 -0700
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-26 11:24 -1000
Re: Which standard? Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-27 17:07 +0200
Re: Which standard? "Peter Knaggs" <pjk@bcs.org.uk> - 2012-03-27 00:54 +0100
Re: Which standard? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-03-21 14:09 -0700
Re: Which standard? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-21 15:47 +0000
Re: Which standard? Nomen Nescio <nobody@dizum.com> - 2012-03-21 20:13 +0100
Re: Which standard? BruceMcF <agila61@netscape.net> - 2012-03-21 15:07 -0700
Re: Which standard? stephenXXX@mpeforth.com (Stephen Pelc) - 2012-03-22 10:14 +0000
Re: Which standard? Nomen Nescio <nobody@dizum.com> - 2012-03-22 16:36 +0100
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-22 08:47 -1000
Re: Which standard? Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-23 15:19 +0100
Re: Which standard? BruceMcF <agila61@netscape.net> - 2012-03-23 07:48 -0700
Re: Which standard? "Peter Knaggs" <pjk@bcs.org.uk> - 2012-03-23 17:28 +0000
Re: Which standard? Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2012-03-23 20:51 +0000
Re: Which standard? "Peter Knaggs" <pjk@bcs.org.uk> - 2012-03-24 00:47 +0000
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-23 08:40 -1000
Re: Which standard? Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-26 04:42 +0200
Re: Which standard? Bernd Paysan <bernd.paysan@gmx.de> - 2012-03-26 19:17 +0200
Re: Which standard? Paul Rubin <no.email@nospam.invalid> - 2012-03-22 13:03 -0700
Re: Which standard? Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-23 19:20 +0100
Re: Which standard? stephenXXX@mpeforth.com (Stephen Pelc) - 2012-03-22 21:15 +0000
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-22 17:54 -0400
Re: Which standard? "The Other Rod Pemberton" <dontaskdonttell@pemberton.it> - 2012-03-23 18:12 +0100
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-23 20:39 -0400
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-23 16:05 -1000
Re: Which standard? Paul Rubin <no.email@nospam.invalid> - 2012-03-23 23:11 -0700
Re: Which standard? "A. K." <akk@nospam.org> - 2012-03-24 09:15 +0100
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-23 22:52 -1000
Re: Which standard? "A. K." <akk@nospam.org> - 2012-03-24 10:16 +0100
Re: Which standard? Paul Rubin <no.email@nospam.invalid> - 2012-03-24 11:25 -0700
Re: Which standard? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-03-24 04:17 -0700
Re: Which standard? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-03-26 21:46 -0700
Re: Which standard? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-03-27 02:49 -0700
Re: Which standard? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-03-27 22:45 -0700
Re: Which standard? Paul Rubin <no.email@nospam.invalid> - 2012-03-23 23:06 -0700
Re: Which standard? Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-26 01:51 +0200
Re: Which standard? Paul Rubin <no.email@nospam.invalid> - 2012-03-22 14:57 -0700
Re: Which standard? Nomen Nescio <nobody@dizum.com> - 2012-03-23 12:48 +0100
Re: Which standard? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-22 17:50 +0000
Re: Which standard? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-03-21 13:37 -0700
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-21 17:07 -0400
Re: Which standard? Nomen Nescio <nobody@dizum.com> - 2012-03-22 09:27 +0100
Re: Which standard? hwfwguy@gmail.com - 2012-03-22 12:06 -0700
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-22 19:19 -0400
Re: Which standard? Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-23 13:02 +0100
Re: Which standard? BruceMcF <agila61@netscape.net> - 2012-03-22 08:17 -0700
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-22 08:25 -1000
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-23 21:50 +0100
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-23 13:10 -1000
Re: Which standard? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-24 11:19 +0000
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-25 07:55 -0400
Re: Which standard? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-26 09:12 +0000
Re: Which standard? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-03-24 04:06 -0700
Re: Which standard? Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-27 21:03 +0200
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-21 22:28 +0100
Re: Which standard? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-03-21 16:36 -0700
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-22 05:15 -0400
Re: Which standard? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-22 12:16 +0000
Re: Which standard? Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-23 01:26 +0100
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-22 15:37 -1000
Re: Which standard? Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-25 22:24 +0200
Re: Which standard? "Peter Knaggs" <pjk@bcs.org.uk> - 2012-03-26 10:49 +0100
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-23 20:00 +0100
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-23 21:21 -0400
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-24 11:44 +0100
Re: Which standard? Bernd Paysan <bernd.paysan@gmx.de> - 2012-03-26 18:51 +0200
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-23 22:16 +0100
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-23 13:21 -1000
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-24 01:33 +0100
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-23 16:06 -1000
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-24 11:44 +0100
Re: Which standard? Jan Coombs <jan_2011-02@murray-microft.co.uk> - 2012-03-24 10:08 +0000
Re: Which standard? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-24 14:31 +0000
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-23 21:24 -0400
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-24 11:54 +0100
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-24 17:25 -0400
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-24 13:43 -1000
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-25 01:43 +0100
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-24 15:56 -1000
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-25 22:49 +0200
Re: Which standard? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-26 09:50 +0000
Re: Which standard? "Peter Knaggs" <pjk@bcs.org.uk> - 2012-03-25 09:18 +0100
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-25 06:07 -0400
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-25 22:42 +0200
Re: Which standard? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-26 09:04 +0000
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-26 04:39 -0500
Re: Which standard? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-03-26 22:29 -0700
Re: Which standard? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-26 18:09 +0000
Re: Which standard? BruceMcF <agila61@netscape.net> - 2012-03-26 11:37 -0700
Re: Which standard? "A. K." <akk@nospam.org> - 2012-03-26 20:49 +0200
Re: Which standard? BruceMcF <agila61@netscape.net> - 2012-03-26 13:22 -0700
Re: Which standard? Helmar Wodtke <helmwo@gmail.com> - 2012-03-26 11:20 -0700
Re: Which standard? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-27 11:59 +0000
Re: Which standard? Helmar Wodtke <helmwo@gmail.com> - 2012-03-27 05:26 -0700
Re: Which standard? "Peter Knaggs" <pjk@bcs.org.uk> - 2012-03-29 00:10 +0100
Re: Which standard? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-03-29 00:51 -0700
Re: Which standard? Marc Olschok <nobody@nowhere.invalid> - 2012-03-30 16:13 +0000
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-30 13:01 -0500
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-03-30 09:18 -1000
Re: Which standard? Alex McDonald <blog@rivadpm.com> - 2012-03-30 14:11 -0700
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-31 08:18 -0500
Re: Which standard? Marc Olschok <nobody@nowhere.invalid> - 2012-04-10 12:43 +0000
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-04-10 10:15 -0500
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-04-10 08:22 -1000
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-04-10 14:03 -0500
Re: Which standard? Alex McDonald <blog@rivadpm.com> - 2012-04-10 12:17 -0700
Re: Which standard? "Elizabeth D. Rather" <erather@forth.com> - 2012-04-10 09:26 -1000
Re: Which standard? Alex McDonald <blog@rivadpm.com> - 2012-04-11 06:22 -0700
Re: Which standard? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-04-11 12:42 +0000
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-04-11 09:40 -0500
Re: Which standard? BruceMcF <agila61@netscape.net> - 2012-04-11 07:55 -0700
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-04-11 11:28 -0500
Re: Which standard? BruceMcF <agila61@netscape.net> - 2012-04-10 12:38 -0700
Re: Which standard? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-04-03 09:27 +0000
Re: Which standard? Marc Olschok <nobody@nowhere.invalid> - 2012-04-10 12:44 +0000
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-25 05:47 -0400
Re: Which standard? BruceMcF <agila61@netscape.net> - 2012-03-25 07:49 -0700
Re: Which standard? BruceMcF <agila61@netscape.net> - 2012-03-24 15:07 -0700
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-24 05:44 -0500
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-23 19:54 +0100
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-23 21:52 -0400
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-24 12:13 +0100
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-24 06:24 -0500
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-24 13:37 +0100
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-24 12:20 -0500
Re: Which standard? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-24 17:24 -0400
Re: Which standard? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-24 14:18 +0000
Re: Which standard? Hans Bezemer <the.beez.speaks@gmail.com> - 2012-03-23 22:33 +0100
Re: Which standard? Bernd Paysan <bernd.paysan@gmx.de> - 2012-03-26 03:25 +0200
Re: Which standard? BruceMcF <agila61@netscape.net> - 2012-03-25 21:40 -0700
Re: Which standard? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-22 04:15 -0500
Re: Which standard? Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-22 13:02 +0100
Re: Which standard? Helmar Wodtke <helmwo@gmail.com> - 2012-03-25 08:51 -0700
Re: Which standard? jacko <jackokring@gmail.com> - 2012-03-26 22:14 -0700
Re: Which standard? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-03-26 23:55 -0700
Re: Which standard? Helmar Wodtke <helmwo@gmail.com> - 2012-03-27 05:41 -0700
Re: Which standard? hwfwguy@gmail.com - 2012-03-27 08:45 -0700
Re: Which standard? Bernd Paysan <bernd.paysan@gmx.de> - 2012-03-28 01:42 +0200
Re: Which standard? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-31 13:46 +0000
Re: Which standard? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-03-27 22:51 -0700
Re: Which standard? jacko <jackokring@gmail.com> - 2012-03-27 19:33 -0700
csiph-web