Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!BRFAPESP.BITNET!UNBCIC From: UNBCIC@BRFAPESP.BITNET Newsgroups: comp.lang.forth Subject: Forth as a general purpose language Message-ID: <9103291459.AA21903@ucbvax.Berkeley.EDU> Date: 28 Mar 91 18:12:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: UNBCIC%BRFAPESP.BITNET@SCFVM.GSFC.NASA.GOV Organization: The Internet Lines: 49 This is a reply to Bill . Interesting that I agree with him in many issues, but in others... The discussion was around types. My point: C & Cia have a way to define records, arrays and some simple types, such as string, integers and reals. They have, also, a mechanism similar to the #DEFINE in C. You say that where the sequence STUDENT is found it should be replaced by RECORD..... Forth don't have records and arrays nor have strings, and the floating-point types are not well-known. (There is, for example, the vendors standard for floating-point, but where I can find the specification, for example?) *BUT* the CREATE ... DOES> (also known as ) mechanism enable Forth to create whatever type you want. For example, I have a package written in Forth 83 (probably runs under ANS Forth) by me who gives to me records, arrays, variant-records and unions. (This package is based on a records proposal for ANS Forth.) See, with ALLOT and other words I can create whatever structure I need, and with DOES> I say how this structure should be manipulated when the --- a word of this "type" is called. It could, for example, display a window on the screen an return data aquired through this window. Is that what, in a previous message, I called "the exactd data type I need". There is another interesting package, OO4TH21, that provides an complete interface to object orientation. It can be written in ANS Forth with no system-depended words (extension wordset words, although). What I consider a user-defined data type is the abstract data type. This is provided by object orientation, so, with ANS Forth, I can have true user-defined data types. The last point of my message was something about "what you need and can't find in comercial Forths" (I know I have said HS/Forth... was an example). I was thinking in what in need that you have in C that you don't have in comercial Forths. I know my arguments are ANS Forth-dependents, that is why I support ANS Forth (the way it is today). Anyway, I'm not interested in this discussion anymore. I think this message is pretty clear about what I think. So, don't expect to be answered on this topic for a while. I'll be hearing (reading) and thinking about for some time... (8-DCS) Daniel C. Sobral UNBCIC@BRFAPESP.BITNET