Object-oriented design offers valuable principles and techniques for structuring data and computation. However, alternative ways to structure software can also be leveraged when designing applications. This chapter provides an introduction to a style of design that uses the function as its primary building block. With functional-style design, structuring the code is achieved through the use of higher-order functions, that is, functions that take other functions as argument. To use higher-order functions requires the programming language to provide support for functions as a first-class program entity. This chapter provides an overview of the Java mechanisms that support functional-style programming and how to use them to integrate elements of functional style into the design of an overall application.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Functional Design

  • Martin P. Robillard

摘要

Object-oriented design offers valuable principles and techniques for structuring data and computation. However, alternative ways to structure software can also be leveraged when designing applications. This chapter provides an introduction to a style of design that uses the function as its primary building block. With functional-style design, structuring the code is achieved through the use of higher-order functions, that is, functions that take other functions as argument. To use higher-order functions requires the programming language to provide support for functions as a first-class program entity. This chapter provides an overview of the Java mechanisms that support functional-style programming and how to use them to integrate elements of functional style into the design of an overall application.