On Mar 23, 7:23 pm, Jonah Thomas <jethom...@[EMAIL PROTECTED]
> wrote:
> Various people have tried out this approach. Many of them have concluded
> that this is simpler some ways, but it moves the complexity into other
> places rather then actually reduce that complexity. I don't know how
> much of the complexity is things that are required by standards but not
> actually needed. It might be simpler to always compile and then simplify
> away other things instead of add complications so you can keep them. I
> don't know.
There is also the question of whether the language is aspiring to
replace Forth as a general purpose incremental compiler.
If, on the one hand, it is built on top of a Forth, with Forth as its
assembler, then it does not have to do *everything* more simply than
Forth, just the things within its target area of competence.
If, on the other hand, it is built under a Forth, as a Forth's
assembler, then it does not have to do *everything* more simply than
Forth, and indeed it does not necessarily have to do anything more
*simply* than Forth, but it has to be able to do some things with more
run-time efficiency than Forth.
I think the former is more likely to be achieved than the latter. The
latter is most likely if the Forth itself is focusing on portability
of its implementation, with the implementation model of bringing up
the underlying stack machine that is simpler to bring up, then loading
Forth as an application of the underlying stack machine.
I find it unlikely that the latter language would be something
distinctly "unForth" but could see something that was line-oriented
where a definition stopped unless you used the "keep going" operation,
and if a definition is not in progress at the end of a line, any code
that is in the current buffer is executed and compilation starts at
the beginning of the current buffer. Of course, converting the current
contents of the buffer into an xt and saving it would crawl the
beginning of the current buffer forward to preserve that code.
" square : dup * ;
" square :
... dup * ;
would have identical results, because second line in the second
definition begins with the "keep defining" operation.
" str-head? : ( ca1 u1 ca2 u2 -- ca1 u1 flag )
... ??dup if-not drop true ; ( an empty string matches )
... then ( and so on ... hard to write in a fictitious language )
";" is just EXIT and has nothing to do with whether code ends.


|