Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #13128
| Newsgroups | comp.lang.forth |
|---|---|
| From | Albert van der Horst <albert@spenarnc.xs4all.nl> |
| Subject | Re: ?EXEC |
| Date | 2012-06-21 14:00 +0000 |
| Message-ID | <m5z081.elv@spenarnc.xs4all.nl> (permalink) |
| Organization | Dutch Forth Workshop |
| References | <m5oer1.l31@spenarnc.xs4all.nl> <jrmd1g$8se$1@speranza.aioe.org> <RvWdnTBpi4XWVkPSnZ2dnUVZ_qudnZ2d@supernews.com> <jru388$iqb$1@speranza.aioe.org> |
In article <jru388$iqb$1@speranza.aioe.org>, Ed <invalid@nospam.com> wrote:
>Elizabeth D. Rather wrote:
>> ...
>> I don't advocate banning ?COMP. I just think it's silly. And making CODE
>> etc. IMMEDIATE just so you can issue an error message in case of blatant
>> silliness is doubly silly.
>>
>> As I've said elsewhere, I support the "intelligent programmer,
>> permissive compiler" theory of programming. I can think of several
>> reasons for using : and END-CODE in definitions, somewhat fewer for
>> CODE, but I see no advantage to making them immediate unless you fancy
>> yourself a programming nanny, in which case maybe Forth is not for you.
>
>And presumably most forth implementors including MPE by
>implication!
>
>?COMP ?EXEC was part of Fig's compiler security package.
>Given compiler security is all about catching unlikely things,
>it was not unreasonable.
>
>If making CODE END-CODE immediate was a bad move,
>then I'm sure those affected would like to hear about it, even
>after all this time. Do you have practical examples to make
>the case?
>
>As regards ?COMP it is the more useful and has been used
>for two things - to prevent inadvertent execution of conditionals
>from corrupting memory, and/or to pinpoint errors early.
>
>In SwiftForth inadvertent execution of BEGIN in immediate
>mode results in an OK message. Is it "Ok" ? Most forth
>implementations including commercials don't agree it is.
>
>No, I don't fancy myself as a "programming nanny". In fact my
>system uses less syntax checking than most. I could remove
>the four ?COMPs currently present and my system would
>still be protected. I don't mind spending the 35 bytes plus
>header it costs for the additional warning ?COMP provides.
>Who knows, even SwiftForth users might like it :)
I think this is a good presentation of the trade offs.
It helps me to decide what I want to do with ciforth.
For ciforth I want ?COMP in. It catches lots of typos.
Using ?EXEC and making defining words IMMEDIATE can prevent
a situation that is extremely puzzling to a novice:
: def1 ....
DROP \ note missing semicolon
: def2 ...
;
\ Point A
....
much later
....
: def3 ...... def2 .....
^^^^
Not found.
The problem is that an error is signalled at a much later time.
If the novice doesn't panic he discovers that at Point A
`` def2 '' is not defined. Then the bug is found soon enough.
The second time the novice (and even I myself) finds the
mistake immediately^H^H^H^H^H^H^H much faster.
On the other side the consequence is to always having to do
POSTPONE : .
One tends to forget that : is IMMEDIATE , because there
seems no good reason to do so, so this too leads to errors
(but those are signalled at the spot and easily corrected.)
Given that ciforth is simplistic and not very user
friendly to begin with, I'm not going to make all defining
words immediate and will not used ?EXEC.
--
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-15 20:40 +0000
Re: ?EXEC "Ed" <invalid@nospam.com> - 2012-06-16 11:14 +1000
Re: ?EXEC BruceMcF <agila61@netscape.net> - 2012-06-16 07:10 -0700
Re: ?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-17 03:01 +0000
Re: ?EXEC "Ed" <invalid@nospam.com> - 2012-06-17 13:36 +1000
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-17 12:27 +0000
Re: ?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-17 20:45 +0000
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-18 13:31 +0000
Re: ?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-18 18:29 +0000
Re: ?EXEC "Elizabeth D. Rather" <erather@forth.com> - 2012-06-18 08:01 -1000
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-19 14:09 +0000
Re: ?EXEC Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-06-19 10:51 -0500
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-19 16:04 +0000
Re: ?EXEC Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-06-19 12:45 -0500
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-20 10:50 +0000
Re: ?EXEC Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-06-20 07:10 -0500
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-20 12:47 +0000
Re: ?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-19 22:52 +0000
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-20 10:59 +0000
Defining Compilation Behaviour - was Re: ?EXEC JennyB <jennybrien@googlemail.com> - 2012-06-21 04:58 -0700
Re: Defining Compilation Behaviour - was Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-21 15:44 +0000
Re: ?EXEC Bernd Paysan <bernd.paysan@gmx.de> - 2012-06-19 02:11 +0200
Re: ?EXEC "Elizabeth D. Rather" <erather@forth.com> - 2012-06-18 14:45 -1000
Re: ?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-19 10:48 +0000
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-19 15:53 +0000
Re: ?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-19 23:00 +0000
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-20 11:09 +0000
Re: ?EXEC BruceMcF <agila61@netscape.net> - 2012-06-20 07:39 -0700
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-20 15:32 +0000
Re: ?EXEC BruceMcF <agila61@netscape.net> - 2012-06-21 11:24 -0700
Re: ?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-20 22:43 +0000
Re: ?EXEC Bernd Paysan <bernd.paysan@gmx.de> - 2012-06-21 21:39 +0200
Re: ?EXEC Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-06-22 02:33 -0500
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-22 11:12 +0000
Re: ?EXEC Bernd Paysan <bernd.paysan@gmx.de> - 2012-06-22 21:34 +0200
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-24 14:58 +0000
Re: ?EXEC Bernd Paysan <bernd.paysan@gmx.de> - 2012-06-24 23:53 +0200
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-19 15:43 +0000
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-19 14:52 +0000
Re: ?EXEC Bernd Paysan <bernd.paysan@gmx.de> - 2012-06-21 22:15 +0200
Re: ?EXEC stephenXXX@mpeforth.com (Stephen Pelc) - 2012-06-22 10:32 +0000
Re: ?EXEC Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-06-22 05:49 -0500
Alternatives to S" and TO (was: ?EXEC) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-22 15:19 +0000
Re: Alternatives to S'' and TO mhx@iae.nl (Marcel Hendrix) - 2012-06-22 20:37 +0200
Re: Alternatives to S'' and TO anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-23 14:46 +0000
Re: Alternatives to S" and TO (was: ?EXEC) BruceMcF <agila61@netscape.net> - 2012-06-22 12:32 -0700
Re: Alternatives to S" and TO Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-06-23 03:07 -0500
Re: Alternatives to S" and TO anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-23 13:32 +0000
Re: Alternatives to S" and TO Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-06-24 08:50 -0500
Re: Alternatives to S" and TO anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-24 15:39 +0000
Re: Alternatives to S" and TO Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-06-25 04:49 -0500
Re: Alternatives to S" and TO BruceMcF <agila61@netscape.net> - 2012-06-25 07:17 -0700
Re: Alternatives to S" and TO Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-06-25 10:13 -0500
Re: Alternatives to S" and TO (was: ?EXEC) Alex McDonald <blog@rivadpm.com> - 2012-06-23 16:01 -0700
Re: Alternatives to S" and TO (was: ?EXEC) Bernd Paysan <bernd.paysan@gmx.de> - 2012-06-24 01:59 +0200
Re: Alternatives to S" and TO (was: ?EXEC) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-24 13:21 +0000
Re: Alternatives to S" and TO (was: ?EXEC) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-24 16:50 +0000
Re: Alternatives to S" and TO (was: ?EXEC) Bernd Paysan <bernd.paysan@gmx.de> - 2012-06-27 23:30 +0200
Re: Alternatives to S" and TO (was: ?EXEC) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-24 13:15 +0000
Re: Alternatives to S" and TO (was: ?EXEC) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-24 16:47 +0000
Re: ?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-22 20:34 +0000
Re: ?EXEC Bernd Paysan <bernd.paysan@gmx.de> - 2012-06-22 21:46 +0200
Re: ?EXEC "Elizabeth D. Rather" <erather@forth.com> - 2012-06-22 10:16 -1000
Re: ?EXEC Bernd Paysan <bernd.paysan@gmx.de> - 2012-06-22 22:43 +0200
Re: ?EXEC "Elizabeth D. Rather" <erather@forth.com> - 2012-06-22 11:18 -1000
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-23 13:50 +0000
Re: ?EXEC BruceMcF <agila61@netscape.net> - 2012-06-17 10:41 -0700
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-17 12:52 +0000
Re: ?EXEC "Elizabeth D. Rather" <erather@forth.com> - 2012-06-17 08:03 -1000
Re: ?EXEC "Ed" <invalid@nospam.com> - 2012-06-18 15:06 +1000
Re: ?EXEC "Elizabeth D. Rather" <erather@forth.com> - 2012-06-17 20:31 -1000
Re: ?EXEC "Ed" <invalid@nospam.com> - 2012-06-21 13:07 +1000
Re: ?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-21 14:00 +0000
Re: ?EXEC BruceMcF <agila61@netscape.net> - 2012-06-21 07:51 -0700
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-21 15:39 +0000
Re: ?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-21 20:28 +0000
Re: ?EXEC "Ed" <invalid@nospam.com> - 2012-06-28 14:22 +1000
Re: ?EXEC Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-06-28 04:00 -0500
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-21 16:09 +0000
Re: ?EXEC Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-06-21 11:51 -0500
Re: ?EXEC BruceMcF <agila61@netscape.net> - 2012-06-21 11:21 -0700
Re: ?EXEC Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-06-22 01:42 -0500
Re: ?EXEC "Elizabeth D. Rather" <erather@forth.com> - 2012-06-21 21:47 -1000
Re: ?EXEC anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-06-22 15:10 +0000
Re: ?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-22 20:39 +0000
Re: ?EXEC BruceMcF <agila61@netscape.net> - 2012-06-22 12:47 -0700
Re: ?EXEC BruceMcF <agila61@netscape.net> - 2012-06-22 12:53 -0700
Re: ?EXEC stephenXXX@mpeforth.com (Stephen Pelc) - 2012-06-21 08:39 +0000
Re: ?EXEC "Ed" <invalid@nospam.com> - 2012-06-23 15:36 +1000
Re: ?EXEC stephenXXX@mpeforth.com (Stephen Pelc) - 2012-06-23 10:58 +0000
Re: ?EXEC "Ed" <invalid@nospam.com> - 2012-06-25 14:26 +1000
Re: ?EXEC stephenXXX@mpeforth.com (Stephen Pelc) - 2012-06-25 08:37 +0000
Re: ?EXEC Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-06-18 10:34 +0000
Re: ?EXEC Coos Haak <chforth@hccnet.nl> - 2012-06-18 17:47 +0200
Re: ?EXEC Coos Haak <chforth@hccnet.nl> - 2012-06-18 17:49 +0200
Re: ?EXEC jacko <jackokring@gmail.com> - 2012-06-22 15:43 -0700
csiph-web