1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

なぜnullは良くないと言われるのか

Posted at

前提

問題

なぜnullは良くないと言われるのか

短い回答

nullそのものは悪くありません。
null許容非安全型も限定的な利用であれば便利なケースもあると言えます。
悪いのはnull許容非安全型をデフォルトの型にしてしまっている言語です(例: Java, C#, Objective-C)。
このような言語はnull許容非安全型を濫用した結果、不要に実行時例外の危険を招いています。

長い回答

TBW

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?