Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: One more named reference scoping thing
On Thu, May 8, 2025 at 2:52 PM Lawrence Velázquez <larryv@xxxxxxx> wrote:
>
> On Thu, May 8, 2025, at 5:35 PM, Philippe Altherr wrote:
> > Sorry for the late reply, I'm spending way too much on the first of my
> > two promised posts, which gets longer and longer :-(
>
> I expect that the longer it gets, the less likely it is to be
> considered.
I'm withholding judgement until I actually see the post, but it's also
the case that the longer the post gets, the harder it likely is to
understand exactly what it's suggesting.
If we're off in the weeds about what happens when a named reference is
initialized multiple scopes downhill from its declaration, and
consequently what happens when the referent goes out of scope as the
stack unwinds, then we're in territory where I'm just as likely to
think we should declare undefined behavior / use at your own risk as
to think we should adopt any new specification before release.
I've already started preparing a documentation patch that specifically
warns against declaring uninitialized references unless you know
exactly where they're going to be initialized. Thinking now that it
should be extended to warn not to trust use of references "in between"
their declaration and their initialization, if I can come up with a
clear way to state that.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author