[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: strange table index "end"
- From: John Passaniti <john@...>
- Date: Wed, 9 Mar 2011 13:06:19 -0500
On Wed, Mar 9, 2011 at 9:27 AM, Leo Razoumov <email@example.com> wrote:
> Out of curiosity, are there languages around that allow keyword
> tokens to be used as variables, strings, etc ?
Forth has no keywords and arguably, no grammar. What people might
think of as keywords are just entries in an editable key/value store
(the "dictionary"). And because the dictionary is consulted first for
all whitespace-separated tokens, that actually means that numbers can
be redefined by putting them in the dictionary. One normally wouldn't
do silly things like redefine the number 23 to be 47 or redefine + to
be *, but you could if for some reason that made sense to your