Re: RfD -- FVALUE vsn 2.0



Gerry <gerry@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

More seriously, what if the user spells the name of the value wrong,
the ' could fail to find the name and throw a system exception. If
that doesn't clear the flag the next TO will abort. So exceptions
need to clear the flag, as does start up, QUIT and what else? The
simple flag implementation starts to look a bit messy if you want a
robust system. And there is still the problem of the user giving an
incorrect value name but which does exist in the dictionary. I'll
stick with a TO that does its own parsing.

This is, I think, a cultural thing. There is an axis of programming
languages that goes from, say, Haskell at one extreme to assembly
language at the other, with Pascal somewhere in between. Forth
traditionally has been close to the same end of that scale as assembly
language: do something stupid and the machine might go up in flames!
C is also not very far from the same end of that scale.

Now, this is only to talk about the language as it is traditionally
implemented, not as it is specified: both C and Forth standards in
theory permit strongly checking implementations that will warn the
programmer if they do anything that may cause undefined behaviour.
But implementers don't usually do that: such checking has considerable
overhead and it makes the implementations much more complex, and
therefore harder to understand, and potentially more bug-ridden.

Of course, there is another cost to strictness: sometimes you want to
go outside the rules, and enforcing the rules can reduce flexibility.
I gave an example if that (a VALUE array) earlier in this thread.

So, I am slightly surprised to see an argument of the form "I want the
computer to be protect me from my own errors" in comp.lang.forth.
Forth is (was?) often the language of choice of people who are sick
and tired of their computers telling them what to do, thank you very
much!

I'm not saying you're wrong, just that I personally find your argument
a bit odd.

Andrew.
.



Relevant Pages

  • Re: "C vs java"
    ... The first obvious error is the confusion of implementations with the ... language proper, in the "compilation" row. ... The "array declarations" row doesn't show how to declare an array. ... realloc but also static declaration syntax. ...
    (comp.lang.c)
  • Re: "C vs java"
    ... The first obvious error is the confusion of implementations with the ... language proper, in the "compilation" row. ... The "array declarations" row doesn't show how to declare an array. ... realloc but also static declaration syntax. ...
    (comp.lang.c)
  • Re: SPITBOL or SNOBOL4 in OS X unix layer?
    ... > I am a long-time user of the old-fashioned programming language package ... > MaxSPITBOL, an implementation of the text-oriented language SPITBOL, ... > But SPITBOL has had several unix implementations over the years. ... When you download it, open a Terminal window and cd to the directory ...
    (comp.sys.mac.system)
  • Re: beginning with ML
    ... If you want to start from core SML and add features, ... from any of the existing implementations, an dthere would be no point ... If you want to design a new language inspired by ...
    (comp.lang.functional)
  • Re: size of a sizeof(pointer)
    ... Few things are crystal-clear in English etymology. ... ("few C implementations provide safe pointers"), ... But the language does not *depend* on this trade-off, ...
    (comp.lang.c)

Loading