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

I'm not suggesting people "express programs in the lambda calculus", but instead that incorporating a philosophy of functions and their composition is not at all a bizarre concept. Loops and ifs work miserably with any hierarchical data, compared to recursion, for example. A lot of the world's data is hierarchical.

We now have a chicken-egg problem. I can freely admit that for+if is easy for programmers to understand solely because of how we are educated, and not due to any Bruce Lee hocus pocus about simplicity or fundamentalism, as so many others here suggest.

A programmer who, say, learned from SICP first would find a for loop awkward and bizarre when you could "just" tail-recurse.



> incorporating a philosophy of functions and their composition is not at all a bizarre concept

Sure, functions and their composition are very often another highly useful abstraction that is easy to reason about and saves the programmer a lot of mental effort.

> We now have a chicken-egg problem.

No, just a recognition, which was not there in the original claim, that ifs and for loops are not the only useful abstractions.

> A programmer who, say, learned from SICP first would find a for loop awkward and bizarre when you could "just" tail-recurse.

Perhaps, but I think such a programmer who needed his code to be readable and understandable by a lot of other people in a large project would end up inventing a "for-loop" macro or something similar that, while it might use tail recursion under the hood, would express the construct in a way that programmers could understand regardless of how they learned programming.




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

Search: