On 6/21/06, Sean Conner <spc at conman.org> wrote:
It was thus said that the Great John R. once stated:
On 6/21/06, Don Y <dgy at dakotacom.net>
wrote:
Amusingly, *except* for parens, LISP largely does
without punctuation!
Unfortunately, parens are a royal PITA as they require tracking
more state than local punctuation.
And RPN languages like Forth can even do away with parentheses.
However I don't know that you could call Forth "punctuation free" or
even Regular (in the sense of not needing a parser). In general Forth
is processed one word at a time with an ad hoc lexer + smarts. Some
words read ahead in the input stream, and state during parsing is
important.
Well, in Forth, functions are called "words" and + is a word. So is (.
As is @. And !. As well as 0 [1], 1 [1] and 2 [1]. There are only a few
words (in ANS Forth) that require looking ahead and they're well known.
Most of the words in Forth pull parameters off the stack.
-spc (And one can always rename @ as fetch)
Right. I think Forth is important to look at when considering the
different types of syntax and grammar that has been explored in
computer languages, but since the OP used the term "punctuation" which
is not a computer science term, I wasn't sure what to do with it. I
figured he was really leaning more toward simple languages that have
less structure. If punctuation means +, !, @, :, ; etc. then Forth has
plenty of punctuation. And it has structure since there are words like
" and : that read ahead in the input stream. Yes they are well known,
but they are still there.
I could imagine a Forth-like language that has no readahead words and
no punctuation that could still be recognized as forthish.
Particularly if you use tail recursion to replace loop nesting like
Colorforth and 4IM do.
-- John.