Re: RfD -- FVALUE vsn 2.0
- From: Andrew Haley <andrew29@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 27 Feb 2009 11:41:11 -0600
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.
.
- Follow-Ups:
- Re: RfD -- FVALUE vsn 2.0
- From: Gerry
- Re: RfD -- FVALUE vsn 2.0
- References:
- RfD -- FVALUE vsn 2.0
- From: Marcel Hendrix
- Re: RfD -- FVALUE vsn 2.0
- From: Jonah Thomas
- Re: RfD -- FVALUE vsn 2.0
- From: hansoft
- Re: RfD -- FVALUE vsn 2.0
- From: Andrew Haley
- Re: RfD -- FVALUE vsn 2.0
- From: Stephen Pelc
- Re: RfD -- FVALUE vsn 2.0
- From: Gerry
- Re: RfD -- FVALUE vsn 2.0
- From: Andrew Haley
- Re: RfD -- FVALUE vsn 2.0
- From: alextangent
- Re: RfD -- FVALUE vsn 2.0
- From: Gerry
- Re: RfD -- FVALUE vsn 2.0
- From: alextangent
- Re: RfD -- FVALUE vsn 2.0
- From: Gerry
- RfD -- FVALUE vsn 2.0
- Prev by Date: Re: Human stack shufflers ?
- Next by Date: Re: Human stack shufflers ?
- Previous by thread: Re: RfD -- FVALUE vsn 2.0
- Next by thread: Re: RfD -- FVALUE vsn 2.0
- Index(es):
Relevant Pages
|
Loading