April 20, 2024, 5:56 a.m. | Robert Teminian

DEV Community dev.to

A post from my old blog:

https://codenested.blogspot.com/2023/01/stdmove-when-stdoptional-should-be.html


Recently I had a chance to take a look at Rust. When returning from a function Rust uses std::option to return either class A in success or class B in exception.


And I found out something similar in C++, namely std::optional. Most of C++ users argued that "why use std::optional when we can fully make use of null pointers?" According to C++ Committee, it was due to minimize human errors. Then we can …

blog chance class cpp exception found function look rust something success

Data Engineer

@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania

Artificial Intelligence – Bioinformatic Expert

@ University of Texas Medical Branch | Galveston, TX

Lead Developer (AI)

@ Cere Network | San Francisco, US

Research Engineer

@ Allora Labs | Remote

Ecosystem Manager

@ Allora Labs | Remote

Founding AI Engineer, Agents

@ Occam AI | New York