On Sunday, 25 December 2016 at 20:01:21 UTC, Stefan Koch wrote:
Well there is one easy way to do this.
pass a pointer to the data.
Another easy one is the definition of one invalid set of values and using that is initial value and for convenience overload opCast(T:bool) to check against that instance.

Well sure, certainly solutions. Could also use exception. But I'm looking for the enhanced API clarity, reduced pointer related errors, and added type safety that optionals usually provide, and it seems the closest thing in D was Nullable.

Reply via email to