Title here
Summary here
In the absence of a language standard, what Nix (the language) is, is prescribed by the behavior of the C++ Nix implementation. Still, there are reasons not to accept some behavior:
__overrides).Especially in the latter case, it makes sense to raise the respective issue and maybe to get rid of the behavior in all implementations for good. Below is an (incomplete) list of such issues:
On the other hand, there is behavior that seems to violate one’s expectation about the language at first, but has good enough reasons from an implementor’s perspective to keep them:
let and inherit. This makes sure that we
only need to do runtime identifier lookups for with. More dynamic (i.e.
runtime) lookups would make the scoping system even more complicated as well
as hurt performance.rec sets are not added to its scope. This makes sense
for the same reason.Other behavior is just odd, surprising or underdocumented:
builtins.foldl' doesn’t force the initial accumulator (but all other
intermediate accumulator values), differing from e.g. Haskell, see
the relevant PR discussion
.