Subj : Re: Compiler and an interpreter To : comp.programming From : Vesa Karvonen Date : Fri Aug 05 2005 01:38 pm CBFalconer wrote: > Vesa Karvonen wrote: > > > ... snip ... > > > > Psychological studies have indicated that short-term memory has a > > capacity of 5-9 "items" (http://www.well.com/user/smalin/miller.html). > > Code in first-order languages typically has lots of little details, > > particularly details related to control flow and resource management, > > that can not easily be abstracted away in those languages. My own > > experience and intuition says that those details quickly eat all the > > available short-term memory and ruin productivity. > It's not the language, but the coding breakdown. By doing a > suitable top-down design you remain at the higher level well into > the design, and the lower levels are exactly what the design needs. I disagree. First of all, I have written hundreds of thousands of lines of code in first-order languages and I know that building certain kinds of abstractions in those languages is much more difficult than in higher-order languages. More to the point, my experience is that pure top-down design is not a good approach to design and construct software. Some bottom-up design is always necessary, but often much of the bottom-up work has already been done by those providing languages and libraries. I consider languages and libraries as artifacts of bottom-up design. Rather than starting with a specific application, you start with a problem domain and gradually build abstractions to allow concrete applications to be written easily. Here is a link to an essay from an advocate of the bottom-up approach http://www.paulgraham.com/progbot.html . I think that one way to gain intuition into the relative merits of top-down and bottom-up programming is to think of the design space of a program as a triangle (or pyramid): Top /\ / \ / \ / \ / \ / \ / \ / \ / \ \/\/\/\/\/\/\/\/\/ Bottom The idea is that the area (or length of a horizontal section) corresponds to the amount of "details" at a particular level of abstraction. There are much more details at the bottom. High-level languages cut out a large section of the bottom of the triangle. Domain specific combinator libraries stake out large blocks of the bottom of the triangle. -Vesa Karvonen .