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