So, like this sort of thing:
int JsonValue::getAsInt(int defaultIfError);
Or, in Go:
func (JsonValue*) AsInt() (int64, error)
Or are you just talking about it returning the value as a Rust-style Result sum type?
int JsonValue::getAsInt(int defaultIfError);
Or, in Go:
func (JsonValue*) AsInt() (int64, error)
Or are you just talking about it returning the value as a Rust-style Result sum type?
The functor approach doesn't involve any type casting, and null pointer exceptions are impossible.