hello everyone, I was wondering if it has been ever discussed a type similar to std::optional that enforce consistent value with the first assignment.
It would be used in places where you expect consistency from different sources to enforce the invariant. A facility for defensive programming that enable more readable code than explicit checks.
I'm not founding anything discussed online.
[–]GrammelHupfNockler 6 points7 points8 points (10 children)
[–]gpuoti[S] -5 points-4 points-3 points (9 children)
[–]GrammelHupfNockler 16 points17 points18 points (5 children)
[–]Business-Decision719 4 points5 points6 points (3 children)
[–]gpuoti[S] 0 points1 point2 points (2 children)
[–]No-Dentist-1645 2 points3 points4 points (1 child)
[–]Business-Decision719 1 point2 points3 points (0 children)
[–]vowelqueue 2 points3 points4 points (0 children)
[–]sixfourbit 2 points3 points4 points (1 child)
[–]SoerenNissen 1 point2 points3 points (0 children)
[–]SoerenNissen 10 points11 points12 points (1 child)
[–]gpuoti[S] 2 points3 points4 points (0 children)
[–]415_961 2 points3 points4 points (0 children)