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

Lambdas require a SAM functional interface to be defined for the thing they are going to be used for which is hardly easy to use or ergonomic compared to something like StandardML, Lisp, or even Javascript.

Also on this topic, but all things "closed" over must be `final`. Any attempt to change the variables closed over by a class will immediately fail.

The fact that Scheme is doing all these things behind the scenes is the point. The programmer isn't responsible for creating new structs/classes, adding all the things, and sending them around to the correct functions. In languages that require all this extra work, closures are seldom used because the extra code and cognitive overhead is almost always bigger than the advantages gained.



I’m not following. Are you somehow equating needing interfaces with having to manually construct classes?

In any case, I don’t see how needing closed over values to be effectively final is a problem. It’s no different than StandardML or OCaml.

I’ve seen lambdas used in Java all over the place, so they clearly have some value.




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

Search: