4 ms·
But these other languages wouldn't necessarily remain type-safe. The functor approach doesn't involve any type casting, and null pointer exceptions are impossi
by actsasbuffoon 9y ago
But these other languages wouldn't necessarily remain type-safe.
The functor approach doesn't involve any type casting, and null pointer exceptions are impossible.
- IshKebab 9y agoSo, 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?