3 ms·
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?
by grandempire 2y 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?
- vkazanov 2y agoYes, 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.