Pieces of command written in bottom up tend to be more general, and thus more reusable then pieces of programs written in top down. Infect one can argue that the purpose bottom up programming is to create an application specific language such a language is suitable for implementing an entire class of applications not only that is to be written. This fact greatly simplifies maintenance in particular adding new features to the application. It also make it possible to delay the final decision concerning the exact functionality of the application being able to delay this decision makes it less likely that the client has changes his or her mind between the establishment of the specifications of the application and its implementation. Top-down” Programming In a language such as C or Java, bottom-up programming takes the form of constructing abstracted data types of primitives of the language or from existing abstract data types.
In common Lisp, in addition to constructing abstract data types, it is common to build functions bottom-up programming from simpler functions and to use macros to construct new special forms from simpler ones. One may a why it is not possible to construct functions and special forms bottom-up in other language than common lisp. Constructing functions bottom-up requires a way of passing complicated arguments between functions. Common lisp uses lists for such argument passing. Lists are flexible standardized data structures in the language. In other language, data structure would have to be defined for such parameter passing only making it more Like an abstract data type, than just a function with respect to special forms only the two level syntax of common lisp allows a flexible enough macro facility for bottom-up programming of special forms.
No comments:
Post a Comment