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

Functional languages provide the ability to (promote?) write expressions that remind me of this sentence.

Just because you can do without temporaries does not mean you should.



How so? The problem comes from having a highly context sensitive grammar, which is hardly something I associate specifically with functional languages; C++ is the usual language that people mock for having an all but Turing complete grammar. I guess the other obvious candidate is Lisp, but that's a different beast all together.


I agree with you that the context sensitive grammar make this sentence hard to parse. However if you look at the clarifications of meaning they break things into bits.

In some languages (e.g.: Java without lambdas), you can't write a function without giving it a name. You have to break things into bits and give them names.

In the functional languages you can just create a lambda and use it.

In a functional style conditionals return values you can use directly. In languages like Java you end up having to assign to temporaries in the branches of the if.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: