Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!utrcgw.utc.COM!RAYBRO%UTRC From: RAYBRO%UTRC@utrcgw.utc.COM ("William R Brohinsky", ay) Newsgroups: comp.lang.forth Subject: RE: Incapsulation and visibility in Forth Message-ID: <8908031600.AA27902@jade.berkeley.edu> Date: 2 Aug 89 22:45:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Forth Interest Group International List Organization: The Internet Lines: 34 Mikael Patel: I must admit that I don't have a good grasp on "incapsulation", as you are using it. I think a definition or reference to some available work would be helpful. Most forths have some "behead" mechanism which leaves "orphan" code with only those words that call it knowing where to find it. After the beheading, the user is not able to use the word directly unless he can find the PFA and incorporate it directly (push it on the stack as a literal and EXECUTE it, usually speaking). I dislike this very much. In my experience, if you can use any forth words as forth words, you are a "programmer" as well as a user, or at least have the ability to act as such. I really dislike ASYST, PolyFORTH(tm), and a few other implementations for doing just this: there is no decompile, and may be no word listing facility, so that the "proprietary" portions of the code stay that way. The carrot for me as programmer is the ability to see how EMIT was done when I need a new EMIT-type word, allowing MYEMIT to function similarly to how the person(s) who implemented my forth did it. For those of you who wrote your own forths (which I will, Leo, in my copious spare time, some day...), why would you WANT to have a mechanism to hide words from yourselves? I are times when I see things like this (or like C) that I believe in my heart-of-heart that I am an inferior outsider. Can the rest of you really remember everything you ever wrote without ever having to decompile? Am I the only one to ride on the coattails of my putative implementator? Or to forget what STLSRGAT was supposed to do? When I don't burn my bridges behind me, I shorten the time a bad memory imposes on me when I must back- track. Maybe when I see the reason for the importance of incapsulation and visibility as programming language parameters (if indeed, programming languages can be so parameterized), I will realize that I am also the only one of us with his thigh in his mouth... -raybro