Motive behind !empty() with front() instead of Optional front()

deadalnix deadalnix at gmail.com
Tue Mar 30 20:51:23 UTC 2021


On Tuesday, 30 March 2021 at 16:05:09 UTC, Paul Backus wrote:
> On Tuesday, 30 March 2021 at 00:51:44 UTC, Andrei Alexandrescu 
> wrote:
>> We investigated a few other possibilities, such as returning a 
>> pointer to the next element or null. But that has problems 
>> related to safety and escaping pointers.
>
> Does -preview=dip1000 help at all with these issues? If so, 
> might be worth revisiting.

DIP1000 is not sufficient, and unsound by itself.


More information about the Digitalmars-d mailing list