Daniel Wigton on Nostr: It is kind of incorrect to say that Rust doesn't have null. The Option Enum has a ...
It is kind of incorrect to say that Rust doesn't have null. The Option Enum has a None variant that gets used all the time. What Rust doesn't have is nullable types. Instead it adds 'Some' as a sort of "not null" this forces you to always handle the null case by forcing you to handle the not null case.
Published at
2024-05-23 17:50:03Event JSON
{
"id": "4807c1ba08af5594e14c97d3539f7d00ecf393f56fca24d6b7cb61168d25c32e",
"pubkey": "75656740209960c74fe373e6943f8a21ab896889d8691276a60f86aadbc8f92a",
"created_at": 1716479403,
"kind": 1,
"tags": [
[
"e",
"60efbc2c34ca4e4ad2ee5f4317a832f213d990fd2fec59ed8e3cb41907b387ca",
"",
"root"
],
[
"e",
"b19990ec7b3aedf241887bbde1e57018f3da951575768e726942ab0c66ea3ca0"
],
[
"e",
"cc99fe7f630600e0b6d9b43890d1608416bd66ee951f257a21fc105751ac0742",
"",
"reply"
],
[
"p",
"fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52"
],
[
"p",
"d3d74124ddfb5bdc61b8f18d17c3335bbb4f8c71182a35ee27314a49a4eb7b1d"
],
[
"p",
"75656740209960c74fe373e6943f8a21ab896889d8691276a60f86aadbc8f92a"
]
],
"content": "It is kind of incorrect to say that Rust doesn't have null. The Option Enum has a None variant that gets used all the time. What Rust doesn't have is nullable types. Instead it adds 'Some' as a sort of \"not null\" this forces you to always handle the null case by forcing you to handle the not null case.",
"sig": "96b9f8029bb37a86cce24fd6e43a8129175fb7a9f3dbaff75c017bcc3e40d168f4b0d6755228e414e757a28acb75bc9562909dc3c1fd94005b37105d364b0829"
}