Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You must be used to reading inside out, instead of left to right.

The parameters will mess up as soon you have multiple parameters. Especially messy if you want to reuse them. Or when you have conditions.

In a graphical system you do not need brackets, which is why I added it as a possible solution.



The first and third are both easier for me than the second.

At least in my case, it's not an inside-out or left-right thing, it's a funnel that shows the exact relationship of the data. The problem with the second one is that the multiple distinct statements require scanning up and down across them to ensure the local variables aren't used anywhere else, and then mentally reconstructing the data's flow from one function to the next.

It's also why I strongly prefer statements like this:

  A(
    B(C),
    D,
    E(F(G))
  )
The flow of data is encoded directly in the visual structure, instead of being split out across various statements using local variables that leak intermediate state and introduce accidental mental overhead.


But the second form is also more general, since you can express any computation that way, whereas you can't in the first or third forms.

For example:

    x = A(B)
    y = D(x) 
    z = C(x, E(y)) 
Is either an important optimization (possibly affecting asymptotic complexity in more complex cases), important for correctness (if any of the functions have side-effects), or at least more succint than the alternatives (in a lazy language like Haskell).




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: