4 ms·
If you write code that crashes on a blank field you'll manage to do that with any language
by on_the_train 1y ago
If you write code that crashes on a blank field you'll manage to do that with any language
- IshKebab 1y agoErr 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.
- ofrzeta 1y agoSo like "var quota : string | null"? :-)
- haiku2077 1y agoOr quota Optional<string>
- IshKebab 1y agoYeah. 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.
- on_the_train 1y agoThere 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.