Re: RfD -- FVALUE vsn 2.0
- From: Andrew Haley <andrew29@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 23 Feb 2009 12:30:07 -0600
hansoft@xxxxxxxxxxx wrote:
On Feb 22, 1:20?am, Jonah Thomas <jethom...@xxxxxxxxx> wrote:
I don't like overloading TO . TO already has to look at the name it
affects and decide whether it's a value or a local. Now you want it to
also decide whether it's a floating value.
I don't like overloading too. It is strange to see that the undoing
of STATE-smart words (while STATE smart words made *some* sense; it
made the language easier to comprehend) was joined with overloading
words (which is another way to make words smart).
But TO isn't really overloaded: that's just a convenient fiction of
the way the language is standardized. All TO has to do is set a flag,
and then execute or compile the action of the name. So, this is AFAIK
allowed:
variable flag
: to 1 flag ! ; immediate
: value
create , immediate
does>
state @ if
postpone literal
flag @ if postpone ! else postpone @ then
else
flag @ if ! else @ then then
0 flag ! ;
I don't like the "state @ if" but the definition of VALUE rather
requires it. I'd rather there were no state-smart words at all, but
that battle was lost in 1994.
Mind you, I agree totally that FVALUE adds nothing useful to the
language: we already have perfectly good VARIABLEs already. However,
quite a few people seem to use it, and apparently that's the only
requirement for standardization.
Andrew.
.
- Follow-Ups:
- Re: RfD -- FVALUE vsn 2.0
- From: hansoft
- Re: RfD -- FVALUE vsn 2.0
- From: Stephen Pelc
- Re: RfD -- FVALUE vsn 2.0
- From: alextangent
- Re: RfD -- FVALUE vsn 2.0
- From: Marcel Hendrix
- 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
- RfD -- FVALUE vsn 2.0
- Prev by Date: Re: RfD: BUFFER:
- Next by Date: Re: RfD -- FVALUE vsn 2.0
- Previous by thread: Re: RfD -- FVALUE vsn 2.0
- Next by thread: Re: RfD -- FVALUE vsn 2.0
- Index(es):
Relevant Pages
|
Loading