3 Oct
2024
3 Oct
'24
9:46 p.m.
On Oct 3, 2024, at 2:37 PM, Said Abou-Hallawa <sabouhallawa@apple.com> wrote:
Object* objectIfExists() { return m_object.get(); } Object* object(); // It try to create m_object but it still may return nullptr;
Well, this is super confusing to me and I think we should find a better pattern for this particular edge case. Maybe something with “try” in the name like we do for “tryCreate()” factory functions. `Object* object()` & `Object* tryEnsureObject()` ?