Comment by IshKebab
6 months ago
Err yeah but the point is languages without null pointers all over the place make it harder to do that in the first place. You normally get some kind of type error at compile time.
6 months ago
Err yeah but the point is languages without null pointers all over the place make it harder to do that in the first place. You normally get some kind of type error at compile time.
There are a lot of ways to prevent this in C++. And all of those which don't would light up static analysis. So as usual, I can't really see the argument.
So like "var quota : string | null"? :-)
Yeah. But C++, C, Java and I think even Go don't let you easily encode nullability into the type system. There have been many attempts to fix it (e.g. `@Nonnull` in Java) but none are as good as Typescript or Rust for example. Dart actually started off with implicit nullability and switched to explicit which was a huge effort.
Or quota Optional<string>