Re: Use of ';' in Forth Compiler



Andrew Haley wrote:

John Doty <jpd@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

Elizabeth D Rather wrote:


 > I can't speak for you, of course, but the major reason I like it is

because its level of interactivity (including as its modularity) makes it much, much quicker to develop and test applications. And that's all connected to the interpreter as well as the way the stack is used for parameter passing.


Again the misconception that the interpreter is a positive thing. The positive thing is the interactive command/execution loop.


Right, and in Forth that's called the "interpreter".  Really, you're
making a spurious distinction here.

No. Your backward Forth dialect happpens to have an interpreter here from historical inertia. A compiler is better. It's a profound distinction, not spurious at all. I was explaining this to a student a few months ago when an old colleague jumped in with "Jon Sachs fixed the most serious defect in Forth." The interpreter is the biggest source of incoherence and unreadability in traditional Forths. And since compiled code can do everything interpreted code can do (and much more) the interpreter is completely unnecessary. But explaining this here often seems like telling a drug addict "You know, the junk is killing you."




Implementing that with an interpreter makes it less effective,
because now instead of a unified language you have two different
languages (which for maximum confusion share a common vocabulary!).


No it doesn't, for reasons that have been explained here many times.

And they have been refuted many times. Your explanation always comes down to "It breaks the following neat trick ...". The trouble is that neat tricks aren't the same as clear, effective coding.


-jpd
.



Relevant Pages

  • Re: Use of ; in Forth Compiler
    ... >>>Again the misconception that the interpreter is a positive thing. ... >> making a spurious distinction here. ... A compiler is better. ... But explaining this here often seems like ...
    (comp.lang.forth)
  • Re: compile
    ... The compiler has no way of knowing ... interpreter does, or is there a better way? ... fine in the compiled code, but if there's a better way I'd love to hear ... especially since malloc() isn't exactly available per se on my TI-85. ...
    (comp.lang.lisp)
  • Re: Logo Compiler?
    ... have a FMSLogo interpreter. ... RUN depends on having the power of the Logo translator ... the compiled code. ...
    (comp.lang.logo)
  • Re: [OT] header file question
    ... but is there any that compilers can do and interpreters ... both places is easier, or at least simpler, in an interpreter, since ... Compiled code almost always runs faster than interpreted, ... You can usually combine object code compiled from multiple languages ...
    (comp.lang.c)
  • Re: just in time accelerator
    ... i came across Just in time accelerator, while studying matlab ... interpreted language and my ques was what r interpreter overheads ... Interpreting code is slower than running the compiled code ...
    (comp.soft-sys.matlab)