Hacker News new | ask | show | jobs
by euccastro 5770 days ago
I'm writing from a phone and lost a longer reply to expired link. In short:

You and the OP (cf. his assumption that you read functional code inside out) seem biased towards a chronological, bottom up reading of code.

An outside-in reading of prefix code is useful to get a top-down general grasp of the structure.

Both approaches are useful and complementary.

This duality also applies when writing code. Cf. "wishful thinking" in SICP: sometimes you want to assume away auxiliar or extraneous functionality to sketch an outline of your program.

In both reading and writing, alternating approaches helps to find the kernel of the problem quickly and to build a whole understanding at your pace, so you don't get bored or stuck.

To that effect, I find prefix notation more balanced, that is, easier to read both ways.

As a practical note, if you follow the 80 column convention long().call().chains() are space hogs and awful to break up. The equivalent problem in lisp is solved with a two-space indent.

But that's just an instance of the syntactic sugar debate. My point is not about notation but how you approach the code.