Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why Functional Programming Matters [pdf] (kent.ac.uk)
3 points by mwattsun on Jan 15, 2022 | hide | past | favorite | 1 comment


I added some notes for those interested:

"Why Functional Programming Matters" explains very well what lazy evaluation is good for and now I know understand what Erik Meijer said in his paper "Confessions of a Used Programming Language Salesman":

http://www.willamette.edu/~fruehr/talks/webcs/MeijerICFP06.p...

This paper is a personal account of my journey to democratize the three-tier distributed programming problem using (*lazy*) functional programming concepts

Haskell’s lazy evaluation and monads make it a very powerful glue language (here he references "Why Functional Programming Matters")

Lazy versus Strict - Strictness is an effect, and most strict functional languages usually include other side-effects such as exceptions, imperative updates, and continuations. Semantically, therefore there is no real difference between a strict, higher-order, functional language, and a strict, higher-order, object oriented language. One might argue that OO languages are actually more powerful than strict functional languages since objects are closures that contain multiple functions (methods) while inheritance and virtual methods correspond to open data types and functions

Reconciling lazy and strict functional languages, however, is still an open research problem, and will remain so for a long time. Until that moment, pure lazy functional languages such as Haskell will remain a niche.

By dropping laziness in strict functional languages such as Scheme, SML, OCaml, Scala and F#, the purity and semantic beauty of true functional programming is lost. When programming in Haskell, laziness is one of those things that you rely on all the time without noticing it; it is something you only realize once you miss it

Here's what "Why Functional Programming Matters" says about it:

...only functional languages use lazy evaluation uniformly for every function call, allowing any part of a program to be modularized in this way. Lazy evaluation is perhaps the most powerful tool for modularization in the functional programmer’s repertoire.

We have argued that functional languages are powerful primarily because they provide two new kinds of glue: higher-order functions and lazy evaluation




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: