Hacker News new | ask | show | jobs
by grandempire 437 days ago
C++ does this and the decision to make is to capture by reference or value.

Environments aren’t a thing in Haskell etc. does that mean it’s not functional?

1 comments

Yes, C++ is a great example of having to make decisions that don't have good solutions without a GC or something like. See mentions of undefined behaviour in relevant sections of the standard, i.e. when a lambda captures something with a limited lifetime.

Are you saying that Haskell doesn't have lexical environments? It very much does, just as all major languages of the ML language family do.