Re:Less is Exponentially More (2012)
by TheCoelacanth on Friday March 09, 2018 @11:00AM
(#16552615)
References being non-nullable is a huge advantage of references.
If you need the equivalent of a nullable reference, you can just use std::optional<std::reference_wrapper<T>> instead and make the nullability explicit.
Re:Less is Exponentially More (2012)
by Retra on Friday March 09, 2018 @08:01PM
(#16556469)
If we used std and wanted every type to be 50+ chars long to type, sure. Or we could just use a pointer, which just so happens is a nullable reference.
If you need the equivalent of a nullable reference, you can just use std::optional<std::reference_wrapper<T>> instead and make the nullability explicit.