Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!willett!dwp From: dwp@willett.UUCP (Doug Philips) Newsgroups: comp.lang.forth Subject: Re: Essence of Forth Message-ID: <508.UUL1.3#5129@willett.UUCP> Date: 19 Feb 90 02:56:12 GMT References: <7414@sdcc6.ucsd.edu> Organization: Latest link in the ForthNet chain. (Pgh, PA) Lines: 112 In <7414@sdcc6.ucsd.edu> ir230@sdcc6.ucsd.edu (john wavrik) writes: > Forth (and other semi-compiled or interpreted languages) seems to be > called to task for the lack of attributes which are more appropriate > in the world of compiled languages. Since so few languages provide an > interactive environment, there is apparently little recognition of the > fact that to get a language to run interactively and efficiently > requires a different set of implementation decisions than a language > designed for pure compilation. Hmmm... What about all the LISP/APL systems in use? I suspect that what's really going on is that Forth is interpreted *and* can run in 5-10K. Of course, then you must raise the issue of "Basic". I suspect that the 'interpreted/interactive' business is not the significant issue. I suspect that the size/time constraints that Forth grew out of are. > APL also does this -- but the overloading is restricted to system- > defined data types. Interpreted BASIC (dare I mention it) also does this. > Overloading of operator symbols requires typing of objects. The idea that > it is desirable is inherited from our experience with compiled languages, > where it does not exact a runtime penalty. The use of overloading in > interactive languages exacts a substantial runtime penalty -- it is one > of the reasons that people believe that interactive languages must be > slow. SmallTalk implementors would have something to say about this. Runtime typing, late binding, etc. are *not* necessarily slow. > Part of the examination of the "essence of Forth" should involve looking > at the distinction between compiled and interpreted languages. One must > ask questions like "Is it really better or easier to write programs if > one is allowed to confuse several conceptually different operations by > giving them the same name?" [Since, in traditionally implemented Forth, > the children of the same defining word have the same address in their > code field, some typing information is available for those who want to > experiment. My own conclusion is that overloading symbols does not > facilitate the programming I do -- and certainly does not justify the > runtime penalty.] Hmmm... what does operator overloading have to do with the distinction between compiled and interpreted languages? ADA and C++, just to name two, both have operator overloading and yet are both compiled. SmallTalk and APL, just to name two, both have operator overloading and yet are both interpreted. I am willing to join you in the examinition of the 'essence of Forth' by considering the C/I distinction, but I don't see it here. > Later in this article, Mitch Bradley will say "I claim that 'Forth- > like' means 'ad-hoc' and I will respond by saying "It is ad hoc in the > best sense -- it is designed to produce the best practical solution to > the problem at hand". The traditional Forth approach to overloading > symbols is not to do it (because of runtime penalties) but to provide > the means if it is deemed necessary. The same applies to range checking > of arrays, having functions check the number and types of their > arguments, etc. I think part of the "essence of Forth" is to provide > tools to build appropriate features rather than provide features which > may or may not be appropriate. Yes, I strongly agree here. Provide the right building blocks, not the end structures. Or at least keep the building block layer available to the end programmer. > If you want a string package in Forth, the best first step would be to > have the Forth community get its act together and make the language > highly portable again. This would allow people to produce a variety of > string packages (among other useful things) that will run on everyone's > Forth [and therefore have a larger market]. And not just string packages. I hope X3J14 can pull this one off. > There are, in fact, subjective characteristics of a programming language > which are an important part of the man-machine interface. These are no > less important because we do not know how to articulate them. I am > impressed if someone tells me of a language by saying: "It's the only > language where I feel I can do anything I want -- I can conceive of > something and carry it out, and not be limited by what the language lets > me do". I'm less impressed by someone who tells me "Its control > structures are orthogonally tangential". I guess that's because I'm a > programmer and not a computer scientist. I'm impressed when someone tells me 'I feel I can do anything I want because the language provides a powerful *and* simple set of building blocks, and the implementation is transparent (i.e. there is no part of it I cannot examine/modify if I need to).' I'm impressed by 'orthoganlly tangentiality' because it means simplicity. As far as Forth is simple it is impressive, as far as it is capricious, it is silly. Ad hoc-ism and being driven by practical considerations is OK. Sometimes the real world doesn't simplify into conceptually separate boxes. There may be a theoretical/practical dichotomy here, at least that is the impression I'm getting. I think such a black and white distinction is silly if not counterproductive. > A group of people do not sit down together and say "let's put together a > language that feels like Zen Buddism". Instead, a group of people are > confronted with a language -- and they find that it feels so different > that they can only describe the experience in religious terms. That could be a sign of either: a) Such a different frame of reference that there isn't yet proper language to describe it; or b) they don't understand what they 'know' well enough to describe it. I find choice 'a' somewhat appealing here, but then I think, they've been at it 10 years and still no language? I suspect that 'b' is more likely, but one cannot prove these kinds of things ;-) > If you do have this sense about Forth, I agree with Mitch that you > probably will not help the cause by beating other people over the head > with it. You can't spread a religion by talking about it -- you have to > put other people in a position to experience it for themselves. Sounds like the Forum or a religous conversion. At least those have pyschological explanations for 'mystic' experiences. I agree though, that the only way to experience a new point of view is to experience a new point of view. It does not follow, however, that one cannot describe *why* one should do it. -Doug --- Preferred: willett!dwp@gateway.sei.cmu.edu OR ...!sei!willett!dwp Daily: ...!{uunet,nfsun}!willett!dwp [in a pinch: dwp@vega.fac.cs.cmu.edu]