Watch out for that tree! A tutorial on shortcut deforestation

Functional programmers are strong enthusiasts of modular solutions to programming problems. Since software characteristics such as readability or maintainability are often directly proportional to modularity, this programming style naturally contributes to the beauty of functional programs. Unfortun...

ver descrição completa

Detalhes bibliográficos
Autor principal: Fernandes, João Paulo (author)
Outros Autores: Cunha, Jácome (author), Saraiva, João (author), Pardo, Alberto (author)
Formato: conferencePaper
Idioma:eng
Publicado em: 2019
Assuntos:
Texto completo:http://hdl.handle.net/1822/68167
País:Portugal
Oai:oai:repositorium.sdum.uminho.pt:1822/68167
Descrição
Resumo:Functional programmers are strong enthusiasts of modular solutions to programming problems. Since software characteristics such as readability or maintainability are often directly proportional to modularity, this programming style naturally contributes to the beauty of functional programs. Unfortunately, in return of this beauty we often sacrifice efficiency: modular programs rely, at runtime, on the creation, use and elimination of intermediate data structures to connect its components. In this tutorial paper, we study an advanced technique that attempts to retain the best of this two worlds: (i) it allows programmers to implement beautiful, modular programs (ii) it shows how to transform such programs, in a way that can be incorporated in a compiler, into programs that do not construct any intermediate structure.