|
|
|
|
|
by blintson
5770 days ago
|
|
Towards the end of his entry he mentioned something about readability. I believe postfix notation is superior in both read & write-ability for FP. Take:
(reduce (lambda (x y) ...) (map (lambda (x) ...) data-set)) When you actually read this what do you do? You work inside-out to understand it. You figure out what 'data-set' is, then you figure out what '(lambda (x) ...) does to it, and so on. You (or me at least) also write the code inside-out. You start with the data, and an idea of how to transform it, and you work your way towards that transformation. Compare to: ((data-set (lambda (x)...) map) (lambda (x y) ...) reduce) Of course, this brings up a lot of edge-cases. Ex.: Where does 'define' fit into this? You really want define and the variable name at the beginning. |
|
This may seem superficial, but it helps readability a lot. The human mind (or mine at least) is just not well suited to unraveling nested structures.