What would we do without NULL?

后端 未结 11 937
迷失自我
迷失自我 2021-02-01 05:26

I once read that having nullable types is an absolute evil. I believe it was in an article written by the very person who created them(in Ada?) I believe this is the article

11条回答
  •  囚心锁ツ
    2021-02-01 05:56

    We'd use option types for the (very) few places where allowing a null value is actually desirable, and we'd have a lot less obscure bugs since any object reference would be guaranteed to point to a valid instance of the appropriate type.

提交回复
热议问题