Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!van-bc!rsoft!mindlink!a684 From: Nick_Janow@mindlink.UUCP (Nick Janow) Newsgroups: comp.software-eng Subject: Re: Reusability considered harmful??(!!) Message-ID: <4682@mindlink.UUCP> Date: 4 Feb 91 02:19:26 GMT Organization: MIND LINK! - British Columbia, Canada Lines: 37 EGNILGES@pucc.Princeton.EDU (Ed Nilges) writes: > However, I believe a theory of reusability has to come from outside the bits > and bytes of programming languages. A function makes sense as a reusable > tool when you can explain it in a simple (no compound phrases) English > sentence to a non-computer user. Examples: > > > This function returns the square root of its argument > This function returns the nth root of its argument > Calculate net pay from gross pay and deductions > Produce voice stress analysis from waveform > Identify out of balance tank condition > . > . > . You're talking about another of Forth's strong points. :) The nature of Forth encourages factoring problems down to single-word-descriptive modules (actually, these are appropriately called "words" in Forth). Forth is often thought of as unreadable, but in fact, good Forth code--especially at the higher levels--is self-documenting. Since the cost (programming time, run time and system resources) for writing words in Forth is low, programmers tend to factor problems down to very short, simple--and thus reusable--words. I'm not trying to start a "my language is better than your language" war. I would like to point out that Forth might provide some useful insights into reusability, since it is inherent in the philosophy of Forth. Whenever talk of reusability or OOP has come up, it's always made me think "they want to become more Forth-like". :) ps. "Thinking Forth", by Leo Brodie, is a good reference for Forth programming philosophy, and modular (reusable) programming in general.