C++ Logo

std-discussion

Advanced search

Fwd: An intuitive fix to dangling references in C++

From: Farid Mehrabi <farid.mehrabi_at_[hidden]>
Date: Wed, 8 Oct 2025 23:49:42 +0330
how am I supposed to end the twisted road of your hair in such a dark
night??
unless the candle of your face does shed some light upon my way!!!

  automatic dangling.h01.pdf
<https://drive.google.com/file/d/1-ZYg2c_dmRSBrQKgA3c6nY4Rfk8bjV4G/view?usp=drivesdk>


---------- Forwarded message ---------
فرستنده: Farid Mehrabi <farid.mehrabi_at_[hidden]>
‪Date: چهارشنبه ۸ اکتبر ۲۰۲۵،‏ ۲۳:۴۶‬
Subject: Re: An intuitive fix to dangling references in C++
To: <std-Discussions_at_[hidden]>




how am I supposed to end the twisted road of your hair in such a dark
night??
unless the candle of your face does shed some light upon my way!!!

در تاریخ دوشنبه ۷ آوریل ۲۰۲۵،‏ ۰۰:۳۸ Farid Mehrabi <farid.mehrabi_at_[hidden]>
نوشت:

> Dear experts and WG members;
>
> The attachment contains a core language proposal, trying to address some
> of the common problems regarding objects with none-dynamic (automatic
> lifetime) objects. The article is trying to provide a mechanism to extend
> some of the restrictions and semantics of references to specific user
> defined types that help reduce the probability of dangling
> references/views. The proposed resolution has been in my mind for about 5
> years, and took about a year to articulate in a succinct and comprehensible
> composition. So, please be patient if it opposes some of your expert
> opinions on the matter. This proposal specifically promotes further life
> extension under strict circumstances, which has primarily been avoided in
> most relevant contexts.
>
> I hope this article is approved as a keystone for building memory safe
> futuristic libraries. in particular, the material this proposal will be an
> enabler for 2 other pending propositions:
>
> 1. shortcut return semantics as safe algorithm and optimization
> extenders.
> 2. a simplified stackless continuation semantics alternative for
> coroutines, which is both easier to use, and more abstract and generic than
> C++20 coroutines.
>
> I am looking forward to reading your kind and honest reviews.
> The initial draft has been posted to some of the audience in advance. this
> post attaches a slightly modified version.
>
>
> regards,
> FM.
>
> --
> how am I supposed to end the twisted road of your hair in such a dark
> night??
> unless the candle of your face does shed some light upon my way!!!
>

Received on 2025-10-08 20:19:38