Path: utzoo!yunexus!ists!jarvis.csri.toronto.edu!rutgers!iuvax!purdue!bouma From: bouma@cs.purdue.EDU (William J. Bouma) Newsgroups: comp.lang.forth Subject: Re: Forth Implementation (long) Summary: not about forth Keywords: Forth implementation Message-ID: <8668@medusa.cs.purdue.edu> Date: 17 Nov 89 22:26:04 GMT Article-I.D.: medusa.8668 References: <5172@sdcc6.ucsd.edu> Organization: Department of Computer Science, Purdue University Lines: 95 In article <5172@sdcc6.ucsd.edu> ir230@sdcc6.ucsd.edu (john wavrik) writes: > >It's a shame that people homed in on the second sentence rather than the >first. Why? What is wrong with discussing this? Does it bother you that people disagree with you? Perhaps your statement was wrong? Perhaps my statements were wrong? I would like to learn. The way to do that is talk about it. >Before we go any further, I'd like to take a vote: > All Forth programmers who believe that "the main thing that > distinguishes Forth from other languages is the parameter stack" > please raise your hand. > [see Bill, none of them do!] Take off them dark sunglasses you are wearing. Besides, since when does the belief of the majority constitute proof? > ---- > >(Problem of adding longs to C expunged.) > >Please note that the problem is to add the data type "long" in such a way that >it has the same status as built-in types. Treating a "long" as an array or a >"struct" and defining functions like long_add would not do! Why not? That is how one does it in C. You pose me a problem and then take away my means of solving it. Then you claim that the problem cannot be solved. >You want to read, without alteration, the source code of a person who has >"long" as a primary type. She has declarations like: > > long x,y,z; >and statements like: > z = x + y; Oh, there is no way to do that. As I have said before, in C the new types you add do not "look like" the ones provided for you in the language. And new operators, being functions, become prefix rather than infix. But give me a few minutes in the editor, and I can convert the code syntax to work with my new definitions. In that sense, perhaps one could call forth better than c. But it has nothing over lisp in being able to do this! >It would be unfair to say that a great deal of Forth programming requires the >use of assembly language or access to the implementation. But it would be fair >to say that the 5% or 10% which does use them is responsible for many of the >claims made by Forth programmers that they can easily achieve things that >would be difficult (or impossible) to do in conventional languages. > >>I said: >> Why not? What do registers have to do with it? If you are writing from >> "within the forth environment" you are writing forth, right? Then why >> does it matter what that forth was written in? > >I hope I've answered this. Hardly! You gave a few examples of intermixing forth and assembly and doing the equivalent without assembly. You gave a bunch of "forth is better than c" propoganda. But you failed to give any evidence to support your claims that I am questioning. The forth-83 standard does not require the words CODE or END-CODE! In fact, it says in section 14.2 "Because of the system dependent nature of machine language programming, a Standard Program cannot use CODE or ;CODE."!! I stand by my claim that one can write forth in any language and have it behave identically. Further, it doesn't matter how much of it is written in the base language (asm, c, or whatever) and how much is in forth. The so called "traditional implementation" has nothing to do with the bahavior of forth at the top level! This seems obvious, but I welcome PROOF to the contrary. >P.S. I don't understand how this newsgroup has become split into two > subgroups. On the one hand we have the people who want to know how many > pins will be on the RTX-3000 (and Phil Koopman who replies by supplying > the phone number of Harris, Inc). On the other, we have 'C' programmers > who are intent at modifying a language they haven't bothered to > understand. Seems to me like both of these subject lines have everything to do with forth and thus belong completely in this news group! If you wish to talk about something else, please do. Yes I program in C, but mostly I program in Common-Lisp. I have written several compilers and interpreters in languages ranging from assembly to ML. Two of those were Forth interpreters. Yet, I "fail to understand" Forth! -- Bill || ...!purdue!bouma