一句话:书评:Bird 与 Gibbons 将算法视为从函数式规约出发、可用 Haskell 系统推导的计算对象。
本文是对 Richard Bird 与 Jeremy Gibbons 所著《Algorithm Design with Haskell》的书评。传统算法教材常把经典算法呈现为数十年前定型的伪代码,而该书主张算法并非刻在石头上的成品,而是可从近乎空白的函数式规约出发、通过计算系统且优雅地推导出来的对象。书中多处推导以 solutions = filter good · candidates 或 algorithm = aggregate · test · generate 这类组合子式骨架开头,体现纯函数式算法设计风格。书评强调这种以 Haskell 为载体的计算式算法呈现,以及从规约到算法的系统推导和教学价值。
Algorithms in their purely functional form. Books on algorithms are plenty. Many present classical algorithms as entities carved in stone, conceived decades ago, and typeset in framed pseudo-code boxes. Not so in the present book. Bird and Gibbons treat any algorithm as a subject of calculation, to be derived systemically and elegantly starting from an (almost) blank sheet that initially holds nothing but a functional specification. In fact, several of these calculations start out with incantations like solutions= filter good · candidates or algorithm= aggregate · test · generate
@article{Grust20,
title = {Review of “Algorithm Design with Haskell” by Richard Bird and Jeremy Gibbons, Cambridge University Press, 2020.},
author = {TORSTEN GRUST},
journal = {Journal of Functional Programming},
volume = {30},
year = {2020},
doi = {10.1017/s0956796820000258}
}