lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Mar 9, 2011 at 9:27 AM, Leo Razoumov <slonik.az@gmail.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
application.