Andrew Helwer on Nostr: I know it wasn't the first to do it but structured enums in #rust are such an ...
I know it wasn't the first to do it but structured enums in #rust are such an obviously good feature that all other programming languages feel ruined. Like how am I supposed to do something as simple as defining a function that returns one of several possible things in python? you can use "is" but then you have a dangling else.
Published at
2023-08-07 17:08:38Event JSON
{
"id": "64c7153db78d6f08c54b43e41960f398f7aa80e6bd974aad1752b6f76c7e9715",
"pubkey": "6235fe36d733665c235dbec5983d768400cdb414ea18e0633cfe9d9c1ac6b02d",
"created_at": 1691428118,
"kind": 1,
"tags": [
[
"t",
"rust"
],
[
"proxy",
"https://fosstodon.org/users/ahelwer/statuses/110849433177039070",
"activitypub"
]
],
"content": "I know it wasn't the first to do it but structured enums in #rust are such an obviously good feature that all other programming languages feel ruined. Like how am I supposed to do something as simple as defining a function that returns one of several possible things in python? you can use \"is\" but then you have a dangling else.",
"sig": "a26086a21990e1e8de42d086a613030ba8861e15acc470de3380ab3392b8e6f1560c7dc6dfd1c42b1637faadcca80211004698ad5bb302c2e919b95b875ea197"
}